File: pod2wiki_simple.pl

package info (click to toggle)
libpod-simple-wiki-perl 0.20-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 444 kB
  • sloc: perl: 3,665; makefile: 2
file content (35 lines) | stat: -rw-r--r-- 617 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/perl -w

#######################################################################
#
# A simple pod2wiki filter demo. See pod2wiki.pl for a more complete
# utility.
#
# reverse(''), May 2003, John McNamara, jmcnamara@cpan.org
#

use strict;
use Pod::Simple::Wiki;


my $parser = Pod::Simple::Wiki->new();


if (defined $ARGV[0]) {
    open IN, $ARGV[0]  or die "Couldn't open $ARGV[0]: $!\n";
} else {
    *IN = *STDIN;
}

if (defined $ARGV[1]) {
    open OUT, ">$ARGV[1]" or die "Couldn't open $ARGV[1]: $!\n";
} else {
    *OUT = *STDOUT;
}


$parser->output_fh(*OUT);
$parser->parse_file(*IN);


__END__