view release on metacpan or search on metacpan
script/_chinese-zodiac-of view on Meta::CPAN
# old_constructor => 'C',
# caller_pkg => 'P',
#);
#
#my %short_barewords = ( EAGERINIT => q{':E'}, NONLAZY => q{':N'} );
#
#my %hands_off = map {($_,1)} qw'&import *import';
#
#sub import {
# return unless @_ == 2 and $_[1] eq 'golf';
# binmode STDOUT;
# my $text = do { local $/; <> };
# print STDOUT golf( $text );
#};
#
#sub golf {
# my ( $text ) = @_;
#
# my $tree = PPI::Document->new( \$text );
#
# my %finder_subs = _finder_subs();
script/_chinese-zodiac-of view on Meta::CPAN
# $OUT = $filename;
# }
# else {
# my $mode = '>';
# if ($filename =~ /^\s*(>{1,2})\s*(.*)$/) {
# ($mode, $filename) = ($1, $2);
# }
# open $OUT, $mode, $filename
# or YAML::Old::Mo::Object->die('YAML_DUMP_ERR_FILE_OUTPUT', $filename, "$!");
# }
# binmode $OUT, ':utf8'; # if $Config{useperlio} eq 'define';
# local $/ = "\n"; # reset special to "sane"
# print $OUT Dump(@_);
# unless (ref $filename eq 'GLOB') {
# close $OUT
# or do {
# my $errsav = $!;
# YAML::Old::Mo::Object->die('YAML_DUMP_ERR_FILE_OUTPUT_CLOSE', $filename, $errsav);
# }
# }
#}
script/_chinese-zodiac-of view on Meta::CPAN
#sub LoadFile {
# my $IN;
# my $filename = shift;
# if (openhandle $filename) {
# $IN = $filename;
# }
# else {
# open $IN, '<', $filename
# or YAML::Old::Mo::Object->die('YAML_LOAD_ERR_FILE_INPUT', $filename, "$!");
# }
# binmode $IN, ':utf8'; # if $Config{useperlio} eq 'define';
# return Load(do { local $/; <$IN> });
#}
#
#sub init_action_object {
# my $self = shift;
# my $object_class = (shift) . '_class';
# my $module_name = $self->$object_class;
# eval "require $module_name";
# $self->die("Error in require $module_name - $@")
# if $@ and "$@" !~ /Can't locate/;
script/_zodiac-of view on Meta::CPAN
# old_constructor => 'C',
# caller_pkg => 'P',
#);
#
#my %short_barewords = ( EAGERINIT => q{':E'}, NONLAZY => q{':N'} );
#
#my %hands_off = map {($_,1)} qw'&import *import';
#
#sub import {
# return unless @_ == 2 and $_[1] eq 'golf';
# binmode STDOUT;
# my $text = do { local $/; <> };
# print STDOUT golf( $text );
#};
#
#sub golf {
# my ( $text ) = @_;
#
# my $tree = PPI::Document->new( \$text );
#
# my %finder_subs = _finder_subs();
script/_zodiac-of view on Meta::CPAN
# $OUT = $filename;
# }
# else {
# my $mode = '>';
# if ($filename =~ /^\s*(>{1,2})\s*(.*)$/) {
# ($mode, $filename) = ($1, $2);
# }
# open $OUT, $mode, $filename
# or YAML::Old::Mo::Object->die('YAML_DUMP_ERR_FILE_OUTPUT', $filename, "$!");
# }
# binmode $OUT, ':utf8'; # if $Config{useperlio} eq 'define';
# local $/ = "\n"; # reset special to "sane"
# print $OUT Dump(@_);
# unless (ref $filename eq 'GLOB') {
# close $OUT
# or do {
# my $errsav = $!;
# YAML::Old::Mo::Object->die('YAML_DUMP_ERR_FILE_OUTPUT_CLOSE', $filename, $errsav);
# }
# }
#}
script/_zodiac-of view on Meta::CPAN
#sub LoadFile {
# my $IN;
# my $filename = shift;
# if (openhandle $filename) {
# $IN = $filename;
# }
# else {
# open $IN, '<', $filename
# or YAML::Old::Mo::Object->die('YAML_LOAD_ERR_FILE_INPUT', $filename, "$!");
# }
# binmode $IN, ':utf8'; # if $Config{useperlio} eq 'define';
# return Load(do { local $/; <$IN> });
#}
#
#sub init_action_object {
# my $self = shift;
# my $object_class = (shift) . '_class';
# my $module_name = $self->$object_class;
# eval "require $module_name";
# $self->die("Error in require $module_name - $@")
# if $@ and "$@" !~ /Can't locate/;
script/chinese-zodiac-of view on Meta::CPAN
}
my $fres;
my $save_res; if (exists $_pci_r->{res}[3]{"cmdline.result"}) { $save_res = $_pci_r->{res}[2]; $_pci_r->{res}[2] = $_pci_r->{res}[3]{"cmdline.result"} }
my $is_success = $_pci_r->{res}[0] =~ /\A2/ || $_pci_r->{res}[0] == 304;
my $is_stream = $_pci_r->{res}[3]{stream} // $_pci_meta_result_stream // 0;
if ($is_success && (0 || $_pci_meta_skip_format || $_pci_r->{res}[3]{"cmdline.skip_format"})) { $fres = $_pci_r->{res}[2] }
elsif ($is_success && $is_stream) {}
else { require Local::_pci_clean_json; require Perinci::Result::Format::Lite; $is_stream=0; _pci_clean_json($_pci_r->{res}); $fres = Perinci::Result::Format::Lite::format($_pci_r->{res}, ($_pci_r->{format} // $_pci_r->{res}[3]{"cmdline.default_format...
my $use_utf8 = $_pci_r->{res}[3]{"x.hint.result_binary"} ? 0 : 0;
if ($use_utf8) { binmode STDOUT, ":encoding(utf8)" }
if ($is_stream) {
my $code = $_pci_r->{res}[2]; if (ref($code) ne "CODE") { die "Result is a stream but no coderef provided" } if ($_pci_meta_result_type_is_simple) { while(defined(my $l=$code->())) { print $fh $l; print $fh "\n" unless $_pci_meta_result_type eq "...
} else {
print $fh $fres;
}
if (defined $save_res) { $_pci_r->{res}[2] = $save_res }
}
### exit
script/chinese-zodiac-of view on Meta::CPAN
#
#=item *
#
#style
#
#Specifies the format of the output table.
#The default is C<'classic'>,
#but other options are C<'boxrule'> and C<'norule'>.
#
#If you use the C<boxrule> style,
#you'll probably need to run C<binmode(STDOUT, ':utf8')>.
#
#Added in 1.00.
#
#
#=item *
#
#indent
#
#Specify an indent that should be prefixed to every line
#of the generated table.
script/chinese-zodiac-of view on Meta::CPAN
#
# | Pokemon | Type | Count |
# +------------+---------+-------+
# | Abra | Psychic | 5 |
# | Ekans | Poison | 123 |
# | Feraligatr | Water | 5678 |
#
#If you want a more stylish looking table,
#set the C<style> parameter to C<'boxrule'>:
#
# binmode(STDOUT,':utf8');
# generate_table(rows => $rows, header_row => 1, style => 'boxrule');
#
#This uses the ANSI box rule characters.
#Note that you will need to ensure UTF output.
#
# âÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâ‰ÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâ‰ÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂ
# â Pokemon â Type â Count âÂÂ
# âÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâ¼âÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâ¼âÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâ¤
# â Abra â Psychic â 5 âÂÂ
# â Ekans â Poison â 123 âÂÂ
script/zodiac-of view on Meta::CPAN
}
my $fres;
my $save_res; if (exists $_pci_r->{res}[3]{"cmdline.result"}) { $save_res = $_pci_r->{res}[2]; $_pci_r->{res}[2] = $_pci_r->{res}[3]{"cmdline.result"} }
my $is_success = $_pci_r->{res}[0] =~ /\A2/ || $_pci_r->{res}[0] == 304;
my $is_stream = $_pci_r->{res}[3]{stream} // $_pci_meta_result_stream // 0;
if ($is_success && (0 || $_pci_meta_skip_format || $_pci_r->{res}[3]{"cmdline.skip_format"})) { $fres = $_pci_r->{res}[2] }
elsif ($is_success && $is_stream) {}
else { require Local::_pci_clean_json; require Perinci::Result::Format::Lite; $is_stream=0; _pci_clean_json($_pci_r->{res}); $fres = Perinci::Result::Format::Lite::format($_pci_r->{res}, ($_pci_r->{format} // $_pci_r->{res}[3]{"cmdline.default_format...
my $use_utf8 = $_pci_r->{res}[3]{"x.hint.result_binary"} ? 0 : 0;
if ($use_utf8) { binmode STDOUT, ":encoding(utf8)" }
if ($is_stream) {
my $code = $_pci_r->{res}[2]; if (ref($code) ne "CODE") { die "Result is a stream but no coderef provided" } if ($_pci_meta_result_type_is_simple) { while(defined(my $l=$code->())) { print $fh $l; print $fh "\n" unless $_pci_meta_result_type eq "...
} else {
print $fh $fres;
}
if (defined $save_res) { $_pci_r->{res}[2] = $save_res }
}
### exit
script/zodiac-of view on Meta::CPAN
#
#=item *
#
#style
#
#Specifies the format of the output table.
#The default is C<'classic'>,
#but other options are C<'boxrule'> and C<'norule'>.
#
#If you use the C<boxrule> style,
#you'll probably need to run C<binmode(STDOUT, ':utf8')>.
#
#Added in 1.00.
#
#
#=item *
#
#indent
#
#Specify an indent that should be prefixed to every line
#of the generated table.
script/zodiac-of view on Meta::CPAN
#
# | Pokemon | Type | Count |
# +------------+---------+-------+
# | Abra | Psychic | 5 |
# | Ekans | Poison | 123 |
# | Feraligatr | Water | 5678 |
#
#If you want a more stylish looking table,
#set the C<style> parameter to C<'boxrule'>:
#
# binmode(STDOUT,':utf8');
# generate_table(rows => $rows, header_row => 1, style => 'boxrule');
#
#This uses the ANSI box rule characters.
#Note that you will need to ensure UTF output.
#
# âÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâ‰ÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâ‰ÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂ
# â Pokemon â Type â Count âÂÂ
# âÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâ¼âÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâ¼âÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâÂÂâ¤
# â Abra â Psychic â 5 âÂÂ
# â Ekans â Poison â 123 âÂÂ
t/00-compile.t view on Meta::CPAN
for my $lib (@module_files)
{
# see L<perlfaq8/How can I capture STDERR from an external command?>
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-e', "require q[$lib]"))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]");
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$lib loaded ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
and not eval { +require blib; blib->VERSION('1.01') };
if (@_warnings)
{
warn @_warnings;
t/00-compile.t view on Meta::CPAN
close $fh and skip("$file uses -T; not testable with PERL5LIB", 1)
if grep { $_ eq '-T' } @switches and $ENV{PERL5LIB};
my $stderr = IO::Handle->new;
diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} }
$^X, @switches, '-c', $file))
if $ENV{PERL_COMPILE_TEST_DEBUG};
my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-c', $file);
binmode $stderr, ':crlf' if $^O eq 'MSWin32';
my @_warnings = <$stderr>;
waitpid($pid, 0);
is($?, 0, "$file compiled ok");
shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/
and not eval { +require blib; blib->VERSION('1.01') };
# in older perls, -c output is simply the file portion of the path being tested
if (@_warnings = grep { !/\bsyntax OK$/ }
grep { chomp; $_ ne (File::Spec->splitpath($file))[2] } @_warnings)