App-Git-Workflow
view release on metacpan or search on metacpan
#!/usr/bin/perl
# Created on: 2014-07-09 12:51:42
# Create by: Ivan Wills
# $Id$
# $Revision$, $HeadURL$, $Date$
# $Revision$, $Source$, $Date$
use strict;
use warnings;
use Getopt::Long;
use Pod::Usage;
use Data::Dumper qw/Dumper/;
use English qw/ -no_match_vars /;
use FindBin qw/$Bin/;
use Path::Tiny;
our $VERSION = 1.1.20;
my ($name) = $PROGRAM_NAME =~ m{^.*/(.*?)$}mxs;
my %option = ();
main();
exit 0;
sub main {
Getopt::Long::Configure('bundling');
GetOptions(
\%option,
'out|o=s',
'verbose|v+',
'man',
'help',
'version!',
) or pod2usage(2);
if ( $option{'version'} ) {
print "$name Version = $VERSION\n";
exit 1;
}
elsif ( $option{'man'} ) {
pod2usage( -verbose => 2 );
}
elsif ( $option{'help'} ) {
pod2usage( -verbose => 1 );
}
# do stuff here
mkdir 'out';
for my $file (path('bin')->children) {
next if !-x $file;
my $out = $file;
$out =~ s/bin/out/;
system "fatpack pack $file > $out";
system "chmod +x $out";
}
return;
}
__DATA__
=head1 NAME
<Name> - <One-line description of commands purpose>
=head1 VERSION
This documentation refers to <Name> version 0.1.1.20
=head1 SYNOPSIS
<Name> [option]
OPTIONS:
-o --other other option
-v --verbose Show more detailed option
--version Prints the version information
--help Prints this help information
--man Prints the full documentation for <Name>
=head1 DESCRIPTION
A full description of the module and its features.
May include numerous subsections (i.e., =head2, =head3, etc.).
=head1 SUBROUTINES/METHODS
A separate section listing the public components of the module's interface.
These normally consist of either subroutines that may be exported, or methods
that may be called on objects belonging to the classes that the module
provides.
Name the section accordingly.
In an object-oriented module, this section should begin with a sentence (of the
form "An object of this class represents ...") to give the reader a high-level
context to help them understand the methods that are subsequently described.
=head1 DIAGNOSTICS
A list of every error and warning message that the module can generate (even
the ones that will "never happen"), with a full explanation of each problem,
one or more likely causes, and any suggested remedies.
=head1 CONFIGURATION AND ENVIRONMENT
A full explanation of any configuration system(s) used by the module, including
the names and locations of any configuration files, and the meaning of any
( run in 2.050 seconds using v1.01-cache-2.11-cpan-cdf2f3d4e48 )