Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 7c87eeffed
Fetching contributors…

Cannot retrieve contributors at this time

87 lines (58 sloc) 1.462 kb
#!/usr/bin/env perl
use strict;
use warnings;
use Getopt::Long;
use Pod::Usage;
use v5.10;
use Data::Dumper;
use IO::File;
my ( $help, $man, $template );
my %opt = (
help => \$help,
man => \$man,
template => \$template,
);
GetOptions( \%opt, 'help|?', 'man', "template|t:s" )
or pod2usage(2);
pod2usage(1) if $help;
pod2usage( -exitstatus => 0, -verbose => 2 ) if $man;
unless ($template) {
pod2usage( -exitstatus => 2, -message => 'Need -template [file]!' );
}
{
my $infile = shift;
my $in_fd;
if ($infile) {
$in_fd = new IO::File:: "< $infile" or die "$infile: $!";
}
else {
$in_fd = \*STDIN;
}
my $in;
{ local $/; undef $/; $in = <$in_fd> };
}
=head1 NAME
atom2file - render html files from atom file
=head1 SYNOPSIS
atom2file -template contrib/template.tmpl < atom.xml
[options]:
-help - print help message
-man - print man page
=head1 OPTIONS
=over 8
=item B<-help>
Print a brief help message and exit
=item B<-man>
Prints manual page and exit
=back
=head1 DESCRIPTION
atom2file - render html files from atom file
=head1 EXAMPLE
atom2file -template contrib/template.tmpl < atom.xml
=head1 AUTHOR
Zahatski Aliaksandr, E<lt>zahatski@gmail.comE<gt>
=head1 COPYRIGHT AND LICENSE
Copyright 2012 by Zahatski Aliaksandr
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=cut
Jump to Line
Something went wrong with that request. Please try again.