extract header section of each input files
[hband-tools.git] / boilerplate / script.pl
blobae15b8d5cd76adf6826a3270246f82faccc9b218
1 #!/usr/bin/env perl
3 =pod
5 =head1 NAME
7 name - description
9 =head1 SYNOPSIS
11 name [I<OPTIONS>] [--]
13 =head1 DESCRIPTION
15 =head1 OPTIONS
17 =over 4
19 =item -v, --verbose
21 =back
23 =head1 LIMITATIONS
25 =head1 SEE ALSO
27 =cut
30 use constant { STAT_DEV=>0, STAT_INODE=>1, STAT_PERM=>2, STAT_NLINKS=>3, STAT_UID=>4, STAT_GID=>5, STAT_RDEV=>6, STAT_SIZE=>7, STAT_ATIME=>8, STAT_MTIME=>9, STAT_CTIME=>10, STAT_BLOCKSIZE=>11, STAT_BLOCKS=>12, };
31 use Cwd qw/getcwd realpath/;
32 use Data::Dumper;
33 use Date::Parse;
34 use DateTime::Format::Strptime;
35 use Encode qw/decode encode decode_utf8 encode_utf8/;
36 use Errno qw/:POSIX/;
37 use Fcntl qw/:flock :seek F_GETFL F_SETFL O_NONBLOCK F_GETFD F_SETFD FD_CLOEXEC/;
38 use File::Basename;
39 use File::Temp qw/tempfile/;
40 use Getopt::Long qw/:config no_ignore_case no_bundling no_getopt_compat no_auto_abbrev require_order/;
41 use IPC::Run qw/run/;
42 use List::MoreUtils qw/all any none/;
43 use Pod::Usage;
44 use POSIX;
45 use Socket qw/AF_UNIX AF_INET SOCK_STREAM pack_sockaddr_in inet_aton sockaddr_un/;
46 no if ($] >= 5.018), 'warnings' => 'experimental::smartmatch';
48 $OptVerbose = 0;
50 GetOptions(
51 'v|verbose!' => \$OptVerbose,
52 'help' => sub { pod2usage(-exitval=>0, -verbose=>99); },
53 '<>' => sub { unshift @ARGV, @_[0]; die '!FINISH'; },
54 ) or pod2usage(-exitval=>2, -verbose=>99);