/usr/bin/pod2sdf is in sdf 2.001+1-5.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
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 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | #!/usr/bin/perl
use Pod::Sdf;
use strict;
# Get the options, if any
my %param = ();
if ($ARGV[0] eq '-m') {
$param{'main'} = 1;
shift;
}
# Check the usage
unless (scalar(@ARGV) == 1) {
print "usage: pod2sdf [-m] infile > outfile\n";
exit 1;
}
# Load the pod into an array
my $infile = shift;
open(INFILE, $infile) || die "unable to open '$infile': $!\n";
my @pod = <INFILE>;
chop(@pod);
# Convert it to SDF and output it
my @sdf = pod2sdf(\@pod, \%param);
print join("\n", @sdf), "\n";
1;
__END__
=head1 NAME
pod2sdf - converts POD to SDF markup
=head1 SYNOPSIS
pod2sdf [-m] infile > outfile
=head1 DESCRIPTION
B<pod2sdf> should be used when one wants to use SDF instead of
POD as the base documentation format. B<sdf> does this
convertion on the fly for C<*.pod, *.pl, *.pm> files for you.
So B<pod2sdf> is only needed when one wants to make extensive use
of the powerful features of SDF and marking them with C<=begin sdf>
and C<=end sdf> gets inconvenient.
=cut
|