view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/cpanchanges.pm view on Meta::CPAN
cpanchanges --distribution libwww-perl
cpanchanges --help
=head1 DESCRIPTION
App::cpanchanges looks up release change logs from
L<MetaCPAN|https://metacpan.org>'s API and displays them to you in your
terminal. Think of it as L<perldoc> or L<cpandoc|Pod::Cpandoc> for change
logs.
By default it expects a module name which it maps to the latest release
(C<AUTHOR/Release-Name-VERSION>) and then looks up the changes file for that
release.
App::cpanchanges is simply a package placeholder for the included cpanchanges
script. The (currently very tiny) guts of the script may be librarized in the
future, but they're very simple right now.
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
my $is_key = $_[2];
# Check this before checking length or it winds up looking like a string!
my $has_string_flag = _has_internal_string_value($string);
return '~' unless defined $string;
return "''" unless length $string;
if (Scalar::Util::looks_like_number($string)) {
# keys and values that have been used as strings get quoted
if ( $is_key || $has_string_flag ) {
return qq['$string'];
}
else {
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
=head2 Exporting Without Using Exporter's import Method
Exporter has a special method, 'export_to_level' which is used in situations
where you can't directly call Exporter's
import method. The export_to_level
method looks like:
MyPackage->export_to_level(
$where_to_export, $package, @what_to_export
);
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
=item * round-trip integrity
When you serialise a perl data structure using only data types supported
by JSON and Perl, the deserialised data structure is identical on the Perl
level. (e.g. the string "2.0" doesn't suddenly become "2" just because
it looks like a number). There I<are> minor exceptions to this, read the
MAPPING section below to learn about those.
=item * strict checking of JSON correctness
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
As this callback gets called less often then the C<filter_json_object>
one, decoding speed will not usually suffer as much. Therefore, single-key
objects make excellent targets to serialise Perl objects into, especially
as single-key JSON objects are as close to the type-tagged value concept
as JSON gets (it's basically an ID/VALUE tuple). Of course, JSON does not
support this in any way, so you need to make sure your data never looks
like a serialised Perl hash.
Typical names for the single object key are C<__class_whatever__>, or
C<$__dollars_are_rarely_used__$> or C<}ugly_brace_placement>, or even
things like C<__class_md5sum(classname)__>, to reduce the risk of clashing
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
my $found = shift()->_do_find_module(@_) or return;
return $found->[1];
}
# given a line of perl code, attempt to parse it if it looks like a
# $VERSION assignment, returning sigil, full name, & package name
sub _parse_version_expression {
my $self = shift;
my $line = shift;
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
'OtherPackage::Name' => ...
}
=head2 C<< package_versions_from_directory($dir, \@files?) >>
Scans C<$dir> for .pm files (unless C<@files> is given, in which case looks
for those files in C<$dir> - and reads each file for packages and versions,
returning a hashref of the form:
{
'Package::Name' => {
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
}
}
sub load_string {
my ($class, $string) = @_;
if ( $string =~ /^---/ ) { # looks like YAML
return $class->load_yaml_string($string);
}
elsif ( $string =~ /^\s*\{/ ) { # looks like JSON
return $class->load_json_string($string);
}
else { # maybe doc-marker-free YAML
return $class->load_yaml_string($string);
}
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
my $arg = shift @args;
# check for lethal dash first to stop processing before causing problems
# the fancy dash is U+2212 or \xE2\x88\x92
if ($arg =~ /\xE2\x88\x92/ or $arg =~ /â/) {
die <<'DEATH';
WHOA THERE! It looks like you've got some fancy dashes in your commandline!
These are *not* the traditional -- dashes that software recognizes. You
probably got these by copy-pasting from the perldoc for this module as
rendered by a UTF8-capable formatter. This most typically happens on an OS X
terminal, but can happen elsewhere too. Please try again after replacing the
dashes with normal minus signs.
lib/App/cpanminus/fatscript.pm view on Meta::CPAN
=item SHELL
=item COMSPEC
local::lib looks at the user's C<SHELL> environment variable when printing out
commands to add to the shell configuration file.
On Win32 systems, C<COMSPEC> is also examined.
=back
view all matches for this distribution
view release on metacpan or search on metacpan
script/cpan-outdated-coro view on Meta::CPAN
## --NOTFOUND: $file
}
# ignore old distribution.
# This is a heuristic approach. It is not a strict.
# If you want a strict check, cpan-outdated looks 02packages.details.txt.gz twice.
# It is too slow.
#
# But, 02packages.details.txt.gz is sorted.
# Submodules are listed after main module most of the time.
# This strategy works well for now.
view all matches for this distribution
view release on metacpan or search on metacpan
my $found = shift()->_do_find_module(@_) or return;
return $found->[1];
}
# given a line of perl code, attempt to parse it if it looks like a
# $VERSION assignment, returning sigil, full name, & package name
sub _parse_version_expression {
my $self = shift;
my $line = shift;
my %arg_store;
for my $arg (@args) {
# check for lethal dash first to stop processing before causing problems
if ($arg =~ /â/) {
die <<'DEATH';
WHOA THERE! It looks like you've got some fancy dashes in your commandline!
These are *not* the traditional -- dashes that software recognizes. You
probably got these by copy-pasting from the perldoc for this module as
rendered by a UTF8-capable formatter. This most typically happens on an OS X
terminal, but can happen elsewhere too. Please try again after replacing the
dashes with normal minus signs.
view all matches for this distribution
view release on metacpan or search on metacpan
#!/usr/bin/perl
use 5.014 ; use strict ; use warnings ;
use Scalar::Util qw/looks_like_number/; # 5.7 ~
use Getopt::Std; getopts '::^:~=+:,:@:0:1:R:d:i:qvm:' , \my %o ;
use Term::ANSIColor qw/:constants color/; $Term::ANSIColor::AUTORESET = 1 ;# v5.6 ~
#use utf8 ;
my $isep = $o{i} // "\t" ; # å
¥åã®åºåãæå
my $oemp = $o{'0'} // 0 ; # åºåã®ã»ã«ãæªå®ç¾©å¤ã®å ´åã«ä»£ããã«åºåããæåå
# my %Cv ; for my$i(@a1){for my$j(@a2){$Cv{$i}{$j}=($Cc{$i}{$j}//0)-($Ce{$i}{$j}//0)}}
}
sub StrNumSort ( @ ) {
+( sort { $a cmp $b } grep { ! looks_like_number ($_) } @_ ) ,
( sort { $a <=> $b } grep { looks_like_number ($_) } @_ ) ;
}
sub showMat ( $$ ) {
my ($C,$h11) = @_ ; # ã»ã«, 縦軸, 横軸, åºå表ã®å·¦ä¸ã®æåå
my @a1 = StrNumSort ( keys %{$C} ) ; # 縦軸ã®åé
ç®å
view all matches for this distribution
view release on metacpan or search on metacpan
t/t_Common.pm view on Meta::CPAN
List::AllUtils->import::into($target,
qw/reduce min max first firstidx any all none sum0/);
require Scalar::Util;
Scalar::Util->import::into($target, qw/blessed reftype looks_like_number
weaken isweak refaddr/);
require Cwd;
Cwd->import::into($target, qw/getcwd abs_path fastgetcwd fast_abs_path/);
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/distfind.pm view on Meta::CPAN
filters out duplicates. Tilde characters will be expanded to C<$ENV{HOME}>.
The returning list is returned as an array reference.
=head2 find_dists
Traverses the given directories, looks for Perl module distributions, and
returns a list of paths to those distribution directories. See C<--prune> for
directories that will be pruned. Also if a Perl module distribution directory
is found, it is then pruned because we assume that it won't recursively
contain another Perl module distribution.
view all matches for this distribution
view release on metacpan or search on metacpan
595746ca292225bcdc3afd484629ac6d75bc72f8
Getting ready to add multiple sources for supporting research
Tue Mar 14 11:35:36 2023 -0400
87e7a4149755bb37ab3c2f7dda241d0a84586d0f
Progress bar looks better now and works like a progress bar with a test application to view it
Mon Mar 13 11:13:58 2023 -0400
cd5c8ab027600d7568f08dc5d3e6b7dd978a4279
Removing class based instantiation of PDL and using just the exported functions
595746ca292225bcdc3afd484629ac6d75bc72f8
Getting ready to add multiple sources for supporting research
Tue Mar 14 11:35:36 2023 -0400
87e7a4149755bb37ab3c2f7dda241d0a84586d0f
Progress bar looks better now and works like a progress bar with a test application to view it
Mon Mar 13 11:13:58 2023 -0400
cd5c8ab027600d7568f08dc5d3e6b7dd978a4279
Removing class based instantiation of PDL and using just the exported functions
595746ca292225bcdc3afd484629ac6d75bc72f8
Getting ready to add multiple sources for supporting research
Tue Mar 14 11:35:36 2023 -0400
87e7a4149755bb37ab3c2f7dda241d0a84586d0f
Progress bar looks better now and works like a progress bar with a test application to view it
Mon Mar 13 11:13:58 2023 -0400
cd5c8ab027600d7568f08dc5d3e6b7dd978a4279
Removing class based instantiation of PDL and using just the exported functions
view all matches for this distribution
view release on metacpan or search on metacpan
script/_finddo view on Meta::CPAN
#
#use 5.010001;
#use strict;
#use warnings;
#
#use Scalar::Util qw(looks_like_number blessed reftype refaddr);
#
#require Exporter;
#our @ISA = qw(Exporter);
#our @EXPORT = qw(dd dmp);
#
script/_finddo view on Meta::CPAN
#
# my $ref = ref($val);
# if ($ref eq '') {
# if (!defined($val)) {
# return "undef";
# } elsif (looks_like_number($val) && !$OPT_STRINGIFY_NUMBERS &&
# $val eq $val+0 &&
# $val !~ /\A-?(?:inf(?:inity)?|nan)\z/i
# ) {
# return $val;
# } else {
script/_finddo view on Meta::CPAN
# for (@_) {
# my $ref = ref($_);
# if ($ref eq 'ARRAY') { $prev = $_ }
# elsif ($ref eq 'HASH') { $meta = $_ }
# elsif (!$ref) {
# if (Scalar::Util::looks_like_number($_)) {
# $status = $_;
# } else {
# $msg = $_;
# }
# }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/gcal.pm view on Meta::CPAN
for my $arg (@$args) {
my $cal;
if ( ( -e $arg ) && ( -r $arg ) ) {
# looks like a file
$cal = _process_file($arg);
}
else {
view all matches for this distribution
view release on metacpan or search on metacpan
script/_genpw-base56 view on Meta::CPAN
#
#use 5.010001;
#use strict;
#use warnings;
#
#use Scalar::Util qw(looks_like_number blessed reftype refaddr);
#
#require Exporter;
#our @ISA = qw(Exporter);
#our @EXPORT = qw(dd dmp);
#
script/_genpw-base56 view on Meta::CPAN
#
# my $ref = ref($val);
# if ($ref eq '') {
# if (!defined($val)) {
# return "undef";
# } elsif (looks_like_number($val) && !$OPT_STRINGIFY_NUMBERS &&
# $val eq $val+0 &&
# $val !~ /\A-?(?:inf(?:inity)?|nan)\z/i
# ) {
# return $val;
# } else {
script/_genpw-base56 view on Meta::CPAN
# for (@_) {
# my $ref = ref($_);
# if ($ref eq 'ARRAY') { $prev = $_ }
# elsif ($ref eq 'HASH') { $meta = $_ }
# elsif (!$ref) {
# if (Scalar::Util::looks_like_number($_)) {
# $status = $_;
# } else {
# $msg = $_;
# }
# }
script/_genpw-base56 view on Meta::CPAN
#}
#
#sub is_valid_plain {
# my $self = shift;
# return 0 unless length $_[0];
# return 0 if $self->quote_numeric_strings and Scalar::Util::looks_like_number($_[0]);
# return 0 if $_[0] =~ /^[\s\{\[\~\`\'\"\!\@\#\>\|\%\&\?\*\^]/;
# return 0 if $_[0] =~ /[\{\[\]\},]/;
# return 0 if $_[0] =~ /[:\-\?]\s/;
# return 0 if $_[0] =~ /\s#/;
# return 0 if $_[0] =~ /\:(\s|$)/;
view all matches for this distribution
view release on metacpan or search on metacpan
script/_genpw-base58 view on Meta::CPAN
#
#use 5.010001;
#use strict;
#use warnings;
#
#use Scalar::Util qw(looks_like_number blessed reftype refaddr);
#
#require Exporter;
#our @ISA = qw(Exporter);
#our @EXPORT = qw(dd dmp);
#
script/_genpw-base58 view on Meta::CPAN
#
# my $ref = ref($val);
# if ($ref eq '') {
# if (!defined($val)) {
# return "undef";
# } elsif (looks_like_number($val) && !$OPT_STRINGIFY_NUMBERS &&
# $val eq $val+0 &&
# $val !~ /\A-?(?:inf(?:inity)?|nan)\z/i
# ) {
# return $val;
# } else {
script/_genpw-base58 view on Meta::CPAN
# for (@_) {
# my $ref = ref($_);
# if ($ref eq 'ARRAY') { $prev = $_ }
# elsif ($ref eq 'HASH') { $meta = $_ }
# elsif (!$ref) {
# if (Scalar::Util::looks_like_number($_)) {
# $status = $_;
# } else {
# $msg = $_;
# }
# }
script/_genpw-base58 view on Meta::CPAN
#}
#
#sub is_valid_plain {
# my $self = shift;
# return 0 unless length $_[0];
# return 0 if $self->quote_numeric_strings and Scalar::Util::looks_like_number($_[0]);
# return 0 if $_[0] =~ /^[\s\{\[\~\`\'\"\!\@\#\>\|\%\&\?\*\^]/;
# return 0 if $_[0] =~ /[\{\[\]\},]/;
# return 0 if $_[0] =~ /[:\-\?]\s/;
# return 0 if $_[0] =~ /\s#/;
# return 0 if $_[0] =~ /\:(\s|$)/;
view all matches for this distribution
view release on metacpan or search on metacpan
script/_genpw-base64 view on Meta::CPAN
#
#use 5.010001;
#use strict;
#use warnings;
#
#use Scalar::Util qw(looks_like_number blessed reftype refaddr);
#
#require Exporter;
#our @ISA = qw(Exporter);
#our @EXPORT = qw(dd dmp);
#
script/_genpw-base64 view on Meta::CPAN
#
# my $ref = ref($val);
# if ($ref eq '') {
# if (!defined($val)) {
# return "undef";
# } elsif (looks_like_number($val) && !$OPT_STRINGIFY_NUMBERS &&
# $val eq $val+0 &&
# $val !~ /\A-?(?:inf(?:inity)?|nan)\z/i
# ) {
# return $val;
# } else {
script/_genpw-base64 view on Meta::CPAN
# for (@_) {
# my $ref = ref($_);
# if ($ref eq 'ARRAY') { $prev = $_ }
# elsif ($ref eq 'HASH') { $meta = $_ }
# elsif (!$ref) {
# if (Scalar::Util::looks_like_number($_)) {
# $status = $_;
# } else {
# $msg = $_;
# }
# }
script/_genpw-base64 view on Meta::CPAN
#}
#
#sub is_valid_plain {
# my $self = shift;
# return 0 unless length $_[0];
# return 0 if $self->quote_numeric_strings and Scalar::Util::looks_like_number($_[0]);
# return 0 if $_[0] =~ /^[\s\{\[\~\`\'\"\!\@\#\>\|\%\&\?\*\^]/;
# return 0 if $_[0] =~ /[\{\[\]\},]/;
# return 0 if $_[0] =~ /[:\-\?]\s/;
# return 0 if $_[0] =~ /\s#/;
# return 0 if $_[0] =~ /\:(\s|$)/;
view all matches for this distribution
view release on metacpan or search on metacpan
script/_genpw-id view on Meta::CPAN
#
#=head2 COMPLETE_BASH_SUMMARY_ALIGN
#
#String. Either C<left> (the default) or C<right>.
#
#The C<left> align looks something like this:
#
# --bar Summary about the bar option
# --baz Summary about the baz option
# --foo Summary about the foo option
# --schapen Summary about the schapen option
script/_genpw-id view on Meta::CPAN
#
#use 5.010001;
#use strict;
#use warnings;
#
#use Scalar::Util qw(looks_like_number blessed reftype refaddr);
#
#require Exporter;
#our @ISA = qw(Exporter);
#our @EXPORT = qw(dd dmp);
#our @EXPORT_OK = qw(dd_ellipsis dmp_ellipsis);
script/_genpw-id view on Meta::CPAN
#
# my $ref = ref($val);
# if ($ref eq '') {
# if (!defined($val)) {
# return "undef";
# } elsif (looks_like_number($val) && !$OPT_STRINGIFY_NUMBERS &&
# # perl does several normalizations to number literal, e.g.
# # "+1" becomes 1, 0123 is octal literal, etc. make sure we
# # only leave out quote when the number is not normalized
# $val eq $val+0 &&
# # perl also doesn't recognize Inf and NaN as numeric
script/_genpw-id view on Meta::CPAN
# for (@_) {
# my $ref = ref($_);
# if ($ref eq 'ARRAY') { $prev = $_ }
# elsif ($ref eq 'HASH') { $meta = $_ }
# elsif (!$ref) {
# if (Scalar::Util::looks_like_number($_)) {
# $status = $_;
# } else {
# $msg = $_;
# }
# }
script/_genpw-id view on Meta::CPAN
#
## Check whether or not a scalar should be emitted as an plain scalar.
#sub is_valid_plain {
# my $self = shift;
# return 0 unless length $_[0];
# return 0 if $self->quote_numeric_strings and Scalar::Util::looks_like_number($_[0]);
# # refer to YAML::Old::Loader::parse_inline_simple()
# return 0 if $_[0] =~ /^[\s\{\[\~\`\'\"\!\@\#\>\|\%\&\?\*\^]/;
# return 0 if $_[0] =~ /[\{\[\]\},]/;
# return 0 if $_[0] =~ /[:\-\?]\s/;
# return 0 if $_[0] =~ /\s#/;
script/_genpw-id view on Meta::CPAN
# }
# else {
# $self->die('YAML_LOAD_ERR_BAD_SEQ_ELEMENT');
# }
#
# # Check whether the preface looks like a YAML mapping ("key: value").
# # This is complicated because it has to account for the possibility
# # that a key is a quoted string, which itself may contain escaped
# # quotes.
# my $preface = $self->preface;
# if ( $preface =~ /^ (\s*) ( \w .*? \: (?:\ |$).*) $/x or
view all matches for this distribution
view release on metacpan or search on metacpan
script/_genpw-ind view on Meta::CPAN
#
#=head2 COMPLETE_BASH_SUMMARY_ALIGN
#
#String. Either C<left> (the default) or C<right>.
#
#The C<left> align looks something like this:
#
# --bar Summary about the bar option
# --baz Summary about the baz option
# --foo Summary about the foo option
# --schapen Summary about the schapen option
script/_genpw-ind view on Meta::CPAN
#
#use 5.010001;
#use strict;
#use warnings;
#
#use Scalar::Util qw(looks_like_number blessed reftype refaddr);
#
#require Exporter;
#our @ISA = qw(Exporter);
#our @EXPORT = qw(dd dmp);
#our @EXPORT_OK = qw(dd_ellipsis dmp_ellipsis);
script/_genpw-ind view on Meta::CPAN
#
# my $ref = ref($val);
# if ($ref eq '') {
# if (!defined($val)) {
# return "undef";
# } elsif (looks_like_number($val) && !$OPT_STRINGIFY_NUMBERS &&
# # perl does several normalizations to number literal, e.g.
# # "+1" becomes 1, 0123 is octal literal, etc. make sure we
# # only leave out quote when the number is not normalized
# $val eq $val+0 &&
# # perl also doesn't recognize Inf and NaN as numeric
script/_genpw-ind view on Meta::CPAN
# for (@_) {
# my $ref = ref($_);
# if ($ref eq 'ARRAY') { $prev = $_ }
# elsif ($ref eq 'HASH') { $meta = $_ }
# elsif (!$ref) {
# if (Scalar::Util::looks_like_number($_)) {
# $status = $_;
# } else {
# $msg = $_;
# }
# }
script/_genpw-ind view on Meta::CPAN
#
## Check whether or not a scalar should be emitted as an plain scalar.
#sub is_valid_plain {
# my $self = shift;
# return 0 unless length $_[0];
# return 0 if $self->quote_numeric_strings and Scalar::Util::looks_like_number($_[0]);
# # refer to YAML::Old::Loader::parse_inline_simple()
# return 0 if $_[0] =~ /^[\s\{\[\~\`\'\"\!\@\#\>\|\%\&\?\*\^]/;
# return 0 if $_[0] =~ /[\{\[\]\},]/;
# return 0 if $_[0] =~ /[:\-\?]\s/;
# return 0 if $_[0] =~ /\s#/;
script/_genpw-ind view on Meta::CPAN
# }
# else {
# $self->die('YAML_LOAD_ERR_BAD_SEQ_ELEMENT');
# }
#
# # Check whether the preface looks like a YAML mapping ("key: value").
# # This is complicated because it has to account for the possibility
# # that a key is a quoted string, which itself may contain escaped
# # quotes.
# my $preface = $self->preface;
# if ( $preface =~ /^ (\s*) ( \w .*? \: (?:\ |$).*) $/x or
view all matches for this distribution
view release on metacpan or search on metacpan
lib/FlashVideo/Generic.pm view on Meta::CPAN
my @filenames;
return $actual_url, $possible_filename if $filename_is_reliable;
$possible_filename =~ s/\?.*//;
# The actual filename, provided it looks like it might be reasonable
# (not just numbers)..
push @filenames, $possible_filename if $possible_filename
&& $possible_filename !~ /^[0-9_.]+@{[EXTENSIONS]}$/;
# The title of the page, if it isn't similar to the filename..
lib/FlashVideo/Generic.pm view on Meta::CPAN
return $actual_url, $possible_filename, $filename_is_reliable;
}
}
if($param =~ m{(rtmp://[^ &"']+)}) {
info "This looks like RTMP ($1), no generic support yet..";
}
return;
}
lib/FlashVideo/Generic.pm view on Meta::CPAN
# It's a video..
debug "Found a video at $uri";
return $uri;
}
# If this looks like HTML we have no hope of guessing right, so
# give up now.
return if $browser->content =~ /<html[^>]*>/i;
if($browser->content =~ m!($video_re)!) {
# Found a video URL
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
script/ghmulti view on Meta::CPAN
# User: <abc@blubb.eu>
HostName github.com
IdentityFile ~/.ssh/baz
IdentitiesOnly yes
The script looks for C<Host> names beginning with C<github->. It assumes that
the part after the hyphen is your username on github. E.g., in the example
above the github usernames are C<foo>, C<bar> and C<baz>.
The next line must be a comment line beginning with C<User:> followed by an
optional name (full name, may contain spaces) followed by an email address in
view all matches for this distribution
view release on metacpan or search on metacpan
share/lib/git-hub view on Meta::CPAN
local action="$1"
local url="$2"
local data="$3"
[[ "$url" =~ [a-zA-Z0-9]/(/|$) ]] &&
error "API url '$url' looks suspiciously wrong"
"$use_auth" && require-auth 1
local user_agent="git-hub-$GIT_HUB_VERSION"
# Cheap trick to make github pretty-print the JSON output.
share/lib/git-hub view on Meta::CPAN
This will guide you through the setup process. Press <ENTER> to run it now.
NOTE: You can also do the setup process by hand using the 'config', 'token'
and 'scope' commands. See the 'git help hub' documentation for more
information on these commands. Or just manually create a config file
in ~/.git-hub/config that looks like this:
[github]
login = your-github-login-id
api-token = c956f87abab2da54882cc1f1ade42efcc2b15dc7
json-lib = json-perl.bash
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/git/ship.pm view on Meta::CPAN
This project can probably get you to the moon.
=item * L<Minilla>
This looks really nice for shipping your project. It has the same idea as
this distribution: Guess as much as possible.
=item * L<Shipit>
One magical tool for doing it all in one bang.
view all matches for this distribution
view release on metacpan or search on metacpan
githook-perltidy in a system-wide location (e.g. /usr/local/bin)
that doesn't change and does not depend on particular PERL5LIB.
githook-perltidy pre-commit
The "pre-commit" command loops through the Git index, checking out
files to a temporary working directory. Then on each file that looks
like a Perl or Pod file it:
* Runs perlcritic if .perlcriticrc exists (for a Perl file)
* Runs perltidy (or perltidy-sweet) (for a Perl file)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/hopen.pm view on Meta::CPAN
use File::Path::Tiny;
use File::stat ();
use Getopt::Long qw(GetOptionsFromArray :config gnu_getopt);
use Hash::Merge;
use Path::Class;
use Scalar::Util qw(looks_like_number);
BEGIN { $Data::Dumper::Indent = 1; } # DEBUG
# }}}1
# Documentation {{{1
lib/App/hopen.pm view on Meta::CPAN
# Sanity check VERBOSE2, and give it a default of 0
my $v2 = $hrOptsOut->{VERBOSE2} // 0;
$v2 = 1 if $v2 eq ''; # --verbose without value === --verbose=1
die "--verbose requires a positive numeric argument"
if (defined $v2) && ( !looks_like_number($v2) || (int($v2) < 0) );
$hrOptsOut->{VERBOSE2} = int($v2 // 0);
} #_parse_command_line() }}}2
# }}}1
view all matches for this distribution
view release on metacpan or search on metacpan
#
#=head2 COMPLETE_BASH_SUMMARY_ALIGN
#
#String. Either C<left> (the default) or C<right>.
#
#The C<left> align looks something like this:
#
# --bar Summary about the bar option
# --baz Summary about the baz option
# --foo Summary about the foo option
# --schapen Summary about the schapen option
#
#use 5.010001;
#use strict;
#use warnings;
#
#use Scalar::Util qw(looks_like_number blessed reftype refaddr);
#
#require Exporter;
#our @ISA = qw(Exporter);
#our @EXPORT = qw(dd dmp);
#our @EXPORT_OK = qw(dd_ellipsis dmp_ellipsis);
#
# my $ref = ref($val);
# if ($ref eq '') {
# if (!defined($val)) {
# return "undef";
# } elsif (looks_like_number($val) && !$OPT_STRINGIFY_NUMBERS &&
# # perl does several normalizations to number literal, e.g.
# # "+1" becomes 1, 0123 is octal literal, etc. make sure we
# # only leave out quote when the number is not normalized
# $val eq $val+0 &&
# # perl also doesn't recognize Inf and NaN as numeric
# for (@_) {
# my $ref = ref($_);
# if ($ref eq 'ARRAY') { $prev = $_ }
# elsif ($ref eq 'HASH') { $meta = $_ }
# elsif (!$ref) {
# if (Scalar::Util::looks_like_number($_)) {
# $status = $_;
# } else {
# $msg = $_;
# }
# }
#
## Check whether or not a scalar should be emitted as an plain scalar.
#sub is_valid_plain {
# my $self = shift;
# return 0 unless length $_[0];
# return 0 if $self->quote_numeric_strings and Scalar::Util::looks_like_number($_[0]);
# # refer to YAML::Old::Loader::parse_inline_simple()
# return 0 if $_[0] =~ /^[\s\{\[\~\`\'\"\!\@\#\>\|\%\&\?\*\^]/;
# return 0 if $_[0] =~ /[\{\[\]\},]/;
# return 0 if $_[0] =~ /[:\-\?]\s/;
# return 0 if $_[0] =~ /\s#/;
# }
# else {
# $self->die('YAML_LOAD_ERR_BAD_SEQ_ELEMENT');
# }
#
# # Check whether the preface looks like a YAML mapping ("key: value").
# # This is complicated because it has to account for the possibility
# # that a key is a quoted string, which itself may contain escaped
# # quotes.
# my $preface = $self->preface;
# if ( $preface =~ /^ (\s*) ( \w .*? \: (?:\ |$).*) $/x or
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
if ( my $code = $sym->{$pwd} ) {
# Delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
unless ($$sym =~ s/([^:]+)$//) {
# XXX: it looks like we can't retrieve the missing function
# via $$sym (usually $main::AUTOLOAD) in this case.
# I'm still wondering if we should slurp Makefile.PL to
# get some context or not ...
my ($package, $file, $line) = caller;
die <<"EOT";
view all matches for this distribution
view release on metacpan or search on metacpan
bin/iosdiff view on Meta::CPAN
=item C<-B>
Use this option to I<suppress> the banner which is printed before the diff
output. Of course, no banner is printed anyway if there's no difference
between the two files being compared. The banner looks like:
~~~ Config diff for device 192.0.2.1
===================================================================
The device name in the banner depends on the name of the "right hand" file
view all matches for this distribution
view release on metacpan or search on metacpan
lib/App/ipinfo.pm view on Meta::CPAN
my %args = ( $defaults->%*, %hash );
bless \%args, $class;
}
=item * looks_like_template(STRING)
Returns true if STRING looks like a template. That is, it has a C<%>
followed by a non-whitespace character. This will get more sophisticated
later.
=cut
sub looks_like_template ($either, $string) {
$string =~ m/%\S/;
}
=item * CLASS->run( [TEMPLATE,] IP_ADDRESS [, IP_ADDRESS ... ] )
=item * OBJ->run( [TEMPLATE,] IP_ADDRESS [, IP_ADDRESS ... ] )
Format every IP address according to TEMPLATE and send the result to
the output filehandle.
If the first argument looks like a template (has a C<%>), it is used
to format the output. Otherwise, the first argument is taken as the start
of the list of IP addresses and the default format is used.
If the invocant is not a reference, it's used as the class name to
build the object. If the invocant is a reference, it's used as the
lib/App/ipinfo.pm view on Meta::CPAN
$g->{base_url_ipv6} = $g->{base_url};
$g;
};
my $method = do {
if( $app->looks_like_ipv4($ip) ) {
'info';
}
elsif( $app->looks_like_ipv6($ip) ) {
$ip = _compact_ipv6($ip);
'info_v6'
}
else {
$app->error( "<$ip> does not look like an IP address. Skipping." );
lib/App/ipinfo.pm view on Meta::CPAN
$app->decode_info($info);
return $info;
}
=item * looks_like_ipv4(IP)
Returns true if IP looks like an IPv4 address.
=cut
sub looks_like_ipv4 ($app, $ip) {
Net::CIDR::cidrvalidate($ip);
}
=item * looks_like_ipv6(IP)
Returns true if IP looks like an IPv6 address.
=cut
sub looks_like_ipv6 ($app, $ip) {
my $compact = _compact_ipv6($ip);
Net::CIDR::cidrvalidate($compact);
}
=item * get_token
view all matches for this distribution