Acme-Pony-Pink

 view release on metacpan or  search on metacpan

bin/perl-pink-pony  view on Meta::CPAN


use Acme::Pony::Pink;
use Getopt::Long;
use Pod::Usage;

GetOptions(
	'help|usage|h' => sub { pod2usage(1) },
	'man'          => sub { pod2usage(-exitstatus => 0, -verbose => 2) },
) or pod2usage(2);

my ($infile, $outfile) = @ARGV;

if (not defined $infile or $infile eq '-')
{
	$infile = \*STDIN;
}

if (not defined $outfile and not ref $infile)
{
	$outfile = $infile . '.gif';
	$outfile =~ s/\.pl\.gif$/.gif/;
}
elsif (not defined $outfile or $outfile eq '-')
{
	$outfile = \*STDOUT;
}

my $acme = Acme::Pony::Pink->new;
$acme->ponify($infile => $outfile);

__END__

=head1 NAME

perl-pink-pony - convert your script into a pink pony

=head1 SYNOPSIS

 perl-pink-pony infile.pl outfile.gif
 
 Options:
   --help        brief help message
   --man         full documentation

=head1 OPTIONS

=over 4

=item B<--help>

lib/Acme/Pony/Pink.pm  view on Meta::CPAN

package Acme::Pony::Pink;

use 5.010;
use autodie;
use strict;
no warnings;
use utf8;

BEGIN {
	$Acme::Pony::Pink::AUTHORITY = 'cpan:TOBYINK';
	$Acme::Pony::Pink::VERSION   = '0.003';
}

use Carp qw<croak>;
use MIME::Base64 qw<decode_base64>;
use List::MoreUtils qw<firstidx>;



( run in 0.236 second using v1.01-cache-2.11-cpan-4d50c553e7e )