Cv
view release on metacpan or search on metacpan
BEGIN {
$IMPORT{$_} = 1 for qw(Histogram More Seq);
$IMPORT{$_} = 0 for qw(Qt BGCodeBookModel Subdiv2D);
$O{$_} = 1 for qw(boxhappy);
}
use Getopt::Long;
sub import {
my $self = shift;
local @ARGV = @_;
my %opt = (
(map { lc($_).'!' => \$IMPORT{$_} } keys %IMPORT),
(map { lc($_).'!' => \$O{$_} } keys %O),
);
unless (GetOptions(%opt)) {
die << "----";
Usage: use Cv @{[ map { "-".($IMPORT{$_}?"no":"").lc($_) } sort keys %IMPORT ]}
----
;
}
my $func = shift;
exists $hints{$func} or return;
$given_hints{$func}++ and return;
my $hint = $hints{$func};
$hint =~ s/^/ /mg;
print " --- hint for $func ---\n", $hint;
}
sub usage
{
my($usage) = do { local(@ARGV,$/)=($0); <> } =~ /^=head\d$HS+SYNOPSIS\s*^(.*?)\s*^=/ms;
my %M = ( 'I' => '*' );
$usage =~ s/^\s*perl\s+\S+/$^X $0/;
$usage =~ s/([A-Z])<([^>]+)>/$M{$1}$2$M{$1}/g;
print <<ENDUSAGE;
Usage: $usage
See perldoc $0 for details.
( run in 0.248 second using v1.01-cache-2.11-cpan-4d50c553e7e )