view release on metacpan or search on metacpan
lib/Acme/Umlautify.pm view on Meta::CPAN
push our @ISA, 'Exporter';
our @EXPORT = qw/umlautify umlautify_latin/;
our @EXPORT_OK = qw/umlautify umlautify_latin/;
our %map = ( A => 196, E => 203, I => 207, O => 214, U => 220, a => 228,
e => 235, i => 239, o => 246, u => 252, y => 255 );
sub new {
bless({},$_[0]);
}
lib/Acme/Umlautify.pm view on Meta::CPAN
return $self->umlautify(@_);
}
sub umlautify {
shift @_ if ref $_[0] eq 'Acme::Umlautify';
my @out = map { join '', map { $_ =~ /[\s\t\n]/ ? $_ : "$_\x{0308}" } split '', $_; } @_;
return wantarray ? @out : $out[0];
}
sub umlautify_latin {
shift @_ if ref $_[0] eq 'Acme::Umlautify';
our %map;
my @out = map { join '', map { $_=chr($map{$_}) if $map{$_}; $_ } split '', $_; } @_;
return wantarray ? @out : $out[0];
}
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-report-prereqs.t view on Meta::CPAN
}
if ( @reports ) {
push @full_reports, "=== $title ===\n\n";
my $ml = _max( map { length $_->[0] } @reports );
my $wl = _max( map { length $_->[1] } @reports );
my $hl = _max( map { length $_->[2] } @reports );
if ($type eq 'modules') {
splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl];
push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports;
}
else {
splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl];
push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports;
}
push @full_reports, "\n";
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Urinal.pm view on Meta::CPAN
sub new {
my ($class, $resources) = @_;
if (ref $resources) {
return bless [ map { [ 0, $_ ] } @$resources ], $class;
}
elsif ($resources > 0) {
return bless [ map { [ 0, $_ ] } 0 .. ($resources - 1) ], $class;
}
else {
croak "incorrect argument";
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
my %WriteMakefileArgs = (
ABSTRACT => $meta->{abstract},
AUTHOR => ($EUMM >= 6.5702 ? $meta->{author} : $meta->{author}[0]),
DISTNAME => $meta->{name},
VERSION => $meta->{version},
EXE_FILES => [ map $_->{file}, values %{ $meta->{x_provides_scripts} || {} } ],
NAME => do { my $n = $meta->{name}; $n =~ s/-/::/g; $n },
test => { TESTS => "t/*.t" },
%dynamic_config,
);
Makefile.PL view on Meta::CPAN
}
{
my ($minperl) = reverse sort(
grep defined && /^[0-9]+(\.[0-9]+)?$/,
map $meta->{prereqs}{$_}{requires}{perl},
qw( configure build runtime )
);
if (defined($minperl))
{
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/VOYAGEGROUP/ConferenceRoom/Output/Color.pm view on Meta::CPAN
sub convert {
my $class = shift;
my $lines = shift;
join "\n", map { $_ =~ s!(/+)!\e[31m$1\e[m!; $_ } @{$lines};
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/AutoInstall.pm view on Meta::CPAN
require CPANPLUS;CPANPLUS::install$p};eval"use $p $v;1"or eval{
require CPAN;CPAN::install$p};eval"use $p $v;1"||die"*** Please
manually install $p $v from cpan.org first...\n"}}}
# Flatten array of arrays into a single array
my @core = map @$_, map @$_, grep ref,
$self->build_requires, $self->requires;
while ( @core and @_ > 1 and $_[0] =~ /^-\w+$/ ) {
push @core, splice(@_, 0, 2);
}
view all matches for this distribution
view release on metacpan or search on metacpan
CONTRIBUTING view on Meta::CPAN
If you send me a patch or pull request, your name and email address will be
included in the documentation as a contributor (using the attribution on the
commit or patch), unless you specifically request for it not to be. If you
wish to be listed under a different name or address, you should submit a pull
request to the .mailmap file to contain the correct mapping.
This file was generated via Dist::Zilla::Plugin::GenerateFile::ShareDir 0.005 from a
template file originating in Dist-Zilla-PluginBundle-Author-ETHER-0.092.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/VerySign.pm view on Meta::CPAN
# Note that we deliberately omit function names that exist
# in the %_BARRED hash
my (@subs, @orig);
my $sym = Devel::Symdump->new($pkg);
@orig = @subs = grep { ! $_BARRED{$_} }
map { s/${pkg}:://; $_ }
grep { defined &{$_} } $sym->functions($pkg);
# Transform all of the subroutine names
foreach (@{$CONF{xform}}) {
croak "Invalid transformer passed to Acme::VerySign\n"
lib/Acme/VerySign.pm view on Meta::CPAN
####################################################################
# unique that array
my %orig = map { $_ => 1 } @orig;
my $this = bless [keys %orig], $class;
return $this;
}
sub as_string { "64.94.110.11" }
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# Normalise multipart versions
$s =~ s/(\.)(\d{1,3})/sprintf("$1%03d",$2)/eg;
}
$s =~ s/^(\d+)\.?//;
my $l = $1 || 0;
my @v = map {
$_ . '0' x (3 - length $_)
} $s =~ /(\d{1,3})\D?/g;
$l = $l . '.' . join '', @v if @v;
return $l + 0;
}
view all matches for this distribution
view release on metacpan or search on metacpan
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';
view all matches for this distribution
view release on metacpan or search on metacpan
examples/weather.pl view on Meta::CPAN
);
my ($temperature) = XML::LibXML
-> load_xml(location => $xml_location)
-> findnodes('//yweather:condition/@temp')
-> map(sub { $_->value });
return "$temperature $unit";
}
local $^F = 1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Win32/PEPM.pm view on Meta::CPAN
a .pm that can be C<do>, C<require>d, or C<use>d, and the same .pm is a 100%
real DLL containing XS code. The generated file meets the file format standards
of both a .pm and a PE (Portable Executable) DLL and uses no temp files.
The author of this module sees this module as a joke since with this
"packager", the .pm text is stored uncompressed in the .dll, and there is no
sane reason to keep .pm text memory mapped into a process since after
parsing/compiling .pm, the .pm text is never referenced again, yet with this
"packager", if the XS DLL is loaded, so is the .pm text, into the process.
The resulting .pm that is built can not be edited even though it mostly looks
like plain text. If it is edited, the DLL will be corrupt. The resulting .pm,
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
my $count = scalar keys %possibles;
my $prereqs_pm = { };
$prereqs_pm->{$_} = $possibles{$_}
for map { ( keys %possibles )[ int rand $count-1 ] } (0 .. 10);
WriteMakefile (
NAME => 'Acme::Working::Out::Dependencies::From::META::files::Will::Be::Wrong::At::Some::Point::Like::This::Module::For::Instance',
VERSION_FROM => 'lib/Acme/Working/Out/Dependencies/From/META/files/Will/Be/Wrong/At/Some/Point/Like/This/Module/For/Instance.pm',
PREREQ_PM => $prereqs_pm,
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# Normalise multipart versions
$s =~ s/(\.)(\d{1,3})/sprintf("$1%03d",$2)/eg;
}
$s =~ s/^(\d+)\.?//;
my $l = $1 || 0;
my @v = map {
$_ . '0' x (3 - length $_)
} $s =~ /(\d{1,3})\D?/g;
$l = $l . '.' . join '', @v if @v;
return $l + 0;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/YAPC/Okinawa/ppport.h view on Meta::CPAN
}
else {
$opt{'compat-version'} = 5;
}
my %API = map { /^(\w+)\|([^|]*)\|([^|]*)\|(\w*)$/
? ( $1 => {
($2 ? ( base => $2 ) : ()),
($3 ? ( todo => $3 ) : ()),
(index($4, 'v') >= 0 ? ( varargs => 1 ) : ()),
(index($4, 'p') >= 0 ? ( provided => 1 ) : ()),
lib/Acme/YAPC/Okinawa/ppport.h view on Meta::CPAN
_aMY_CXT|5.007003||p
_add_range_to_invlist|||
_append_range_to_invlist|||
_core_swash_init|||
_get_encoding|||
_get_regclass_nonbitmap_data|||
_get_swash_invlist|||
_invlist_array_init|||n
_invlist_contains_cp|||n
_invlist_contents|||
_invlist_dump|||
lib/Acme/YAPC/Okinawa/ppport.h view on Meta::CPAN
ptr_table_free||5.009005|
ptr_table_new||5.009005|
ptr_table_split||5.009005|
ptr_table_store||5.009005|
push_scope|||
put_charclass_bitmap_innards|||
put_code_point|||
put_range|||
pv_display|5.006000||p
pv_escape|5.009004||p
pv_pretty|5.009004||p
lib/Acme/YAPC/Okinawa/ppport.h view on Meta::CPAN
$replace{$2} = $1 if $replace and m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+)};
$replace{$2} = $1 if m{^\s*#\s*define\s+(\w+)(?:\([^)]*\))?\s+(\w+).*$rccs\s+Replace\s+$rcce};
$replace{$1} = $2 if m{^\s*$rccs\s+Replace (\w+) with (\w+)\s+$rcce\s*$};
if (m{^\s*$rccs\s+(\w+(\s*,\s*\w+)*)\s+depends\s+on\s+(\w+(\s*,\s*\w+)*)\s+$rcce\s*$}) {
my @deps = map { s/\s+//g; $_ } split /,/, $3;
my $d;
for $d (map { s/\s+//g; $_ } split /,/, $1) {
push @{$depends{$d}}, @deps;
}
}
$need{$1} = 1 if m{^#if\s+defined\(NEED_(\w+)(?:_GLOBAL)?\)};
lib/Acme/YAPC/Okinawa/ppport.h view on Meta::CPAN
exit 0;
}
my @files;
my @srcext = qw( .xs .c .h .cc .cpp -c.inc -xs.inc );
my $srcext = join '|', map { quotemeta $_ } @srcext;
if (@ARGV) {
my %seen;
for (@ARGV) {
if (-e) {
lib/Acme/YAPC/Okinawa/ppport.h view on Meta::CPAN
$File::Find::name =~ /($srcext)$/i
and push @files, $File::Find::name;
}, '.');
};
if ($@) {
@files = map { glob "*$_" } @srcext;
}
}
if (!@ARGV || $opt{filter}) {
my(@in, @out);
my %xsc = map { /(.*)\.xs$/ ? ("$1.c" => 1, "$1.cc" => 1) : () } @files;
for (@files) {
my $out = exists $xsc{$_} || /\b\Q$ppport\E$/i || !/($srcext)$/i;
push @{ $out ? \@out : \@in }, $_;
}
if (@ARGV && @out) {
lib/Acme/YAPC/Okinawa/ppport.h view on Meta::CPAN
my($func, $seen) = @_;
return () unless exists $depends{$func};
$seen = {%{$seen||{}}};
return () if $seen->{$func}++;
my %s;
grep !$s{$_}++, map { ($_, rec_depend($_, $seen)) } @{$depends{$func}};
}
sub parse_version
{
my $ver = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/YourBrainForOnceDude.pm view on Meta::CPAN
package YourBrainForOnceDude;
our $VERSION = '0.18';
require Acme::Buffy;
INIT {
local $/; my @magic = qw(-11 3 5 -3 11);
my @brains=Acme::Buffy::_unslay(($B=<DATA>)=~s/(r(a(i(n))))/join'.',map"chr(ord(\$$_)+$magic[$_])",(1..4)/geieio,$B)=~/(.*?\012)/g;
END {printf $brains[int rand(@brains)], __PACKAGE__}
}
__DATA__
BRaiN bRAIN BRaiN bRAIN BraIN BrAIN bRAiN BrAIN BRAin braIN BRAiN BraIN brain brAIn BRAiN BrAIN BRain BrAIn bRAiN BraIN BRaiN BrAIn BRAin BraIN BrAiN BraiN bRAin BRaIN BraIN Brain bRaiN BrAIN BRaiN BrAiN bRAin BraIN brain brAiN bRaiN brAIN bRAIn braI...
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Your/Filter.pm view on Meta::CPAN
$assign = $tree->[-2];
}
my @ids = _walk_tree($tree);
my $new_statement = join('', map { _variable_declaration($pattern, $_) } @ids );
if ($assign) {
$new_statement .= "(". join(', ', @ids) .") = $assign;";
}
#print $new_statement;
return $new_statement;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Zalgo.pm view on Meta::CPAN
\x{0347}\x{0348}\x{0349}\x{034d}
\x{034e}\x{0353}\x{0354}\x{0355}
\x{0356}\x{0359}\x{035a}\x{0323}
HE_COMES
our @ZALGO = map { my $s = $_; $s =~ s/\s+//g; $s } grep {$_} split qr/^#.*?$/ms, $chars;
use Carp;
sub randint {
my ($min, $max) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/ZeroWidth.pm view on Meta::CPAN
sub to_zero_width {
my ($visible) = @_;
my $not_visible = join "\x{200d}",
map { s/1/\x{200b}/g; s/0/\x{200c}/g; $_ }
map { unpack 'B*', $_ } split //,
$visible;
return $not_visible;
}
sub from_zero_width {
my ($not_visible) = @_;
return join '', map { pack 'B*', $_ }
map { s/\x{200b}/1/g; s/\x{200c}/0/g; $_ } split /\x{200d}/, $not_visible;
}
1;
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
my %WriteMakefileArgs = (
ABSTRACT => $meta->{abstract},
AUTHOR => ($EUMM >= 6.5702 ? $meta->{author} : $meta->{author}[0]),
DISTNAME => $meta->{name},
VERSION => $meta->{version},
EXE_FILES => [ map $_->{file}, values %{ $meta->{x_provides_scripts} || {} } ],
NAME => do { my $n = $meta->{name}; $n =~ s/-/::/g; $n },
test => { TESTS => "t/*.t" },
%dynamic_config,
);
Makefile.PL view on Meta::CPAN
}
{
my ($minperl) = reverse sort(
grep defined && /^[0-9]+(\.[0-9]+)?$/,
map $meta->{prereqs}{$_}{requires}{perl},
qw( configure build runtime )
);
if (defined($minperl))
{
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Makefile.pm view on Meta::CPAN
die "tests_recursive dir '$dir' does not exist";
}
require File::Find;
%test_dir = ();
File::Find::find( \&_wanted_t, $dir );
$self->tests( join ' ', map { "$_/*.t" } sort keys %test_dir );
}
sub write {
my $self = shift;
die "&Makefile->write() takes no arguments\n" if @_;
inc/Module/Install/Makefile.pm view on Meta::CPAN
}
# merge both kinds of requires into prereq_pm
my $prereq = ($args->{PREREQ_PM} ||= {});
%$prereq = ( %$prereq,
map { @$_ }
map { @$_ }
grep $_,
($self->build_requires, $self->requires)
);
# merge both kinds of requires into prereq_pm
inc/Module/Install/Makefile.pm view on Meta::CPAN
. "but we need version >= $perl_version";
}
$args->{INSTALLDIRS} = $self->installdirs;
my %args = map { ( $_ => $args->{$_} ) } grep {defined($args->{$_})} keys %$args;
my $user_preop = delete $args{dist}->{PREOP};
if (my $preop = $self->admin->preop($user_preop)) {
$args{dist} = $preop;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/eng2kor.pm view on Meta::CPAN
);
sub translate {
my ($self, $word) = @_;
map { s/^\s+//; s/\s+$// } $word if defined $word;
return $self->_google_translate($word);
}
sub _google_translate {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/require/case.pm view on Meta::CPAN
my ( $prefix, $filename ) = @_;
my $search = path($prefix); # clone
my @parts = split qr{/}, $filename;
my $valid = 1;
while ( my $p = shift @parts ) {
if ( grep { $p eq $_ } map { $_->basename } $search->children ) {
$search = $search->child($p);
}
else {
$valid = 0;
my ($actual) = grep { lc $p eq lc $_ } map { $_->basename } $search->children;
$search = $search->child($actual);
}
}
return ( $valid, $search->relative($prefix) );
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acrux/DBI.pm view on Meta::CPAN
}
my $rv;
my $argb = '';
if (scalar @$bind_values) {
$argb = sprintf(" with bind values: %s",
join(", ", map {defined($_) ? sprintf("'%s\'", $_) : 'undef'} @$bind_values));
$rv = $sth->execute(@$bind_values);
} elsif (my $cb = $args->{bind_callback} || $args->{bind_cb}) {
unless (is_code_ref($cb)) {
$self->error("Invalid binding callback function. Code ref expected");
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Crux.pm view on Meta::CPAN
my $pidfile = $self->{pidfile};
unless (defined($pidfile) && length($pidfile)) {
$self->{pidfile} = File::Spec->catfile(IS_ROOT ? $rundir : $pwd, sprintf("%s.pid", $moniker));
}
# Define plugins list to plugin map
$self->plugins(as_hash_ref($args->{plugins}));
# Preloading plugins
my $preload_plugins = $self->{preload_plugins};
$preload_plugins = [$preload_plugins] unless is_array_ref($preload_plugins);
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-report-prereqs.t view on Meta::CPAN
}
if ( @reports ) {
push @full_reports, "=== $title ===\n\n";
my $ml = _max( map { length $_->[0] } @reports );
my $wl = _max( map { length $_->[1] } @reports );
my $hl = _max( map { length $_->[2] } @reports );
if ($type eq 'modules') {
splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl];
push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports;
}
else {
splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl];
push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports;
}
push @full_reports, "\n";
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Action/Retry.pm view on Meta::CPAN
Here is an example of code that gets the arguments properly:
my $action = Action::Retry->new(
attempt_code => sub { do_stuff; } )->run();
attempt_code => sub { map { $_ * 2 } @_ }
retry_if_code => sub {
my ($error, $h) = @_;
my $attempt_code_result = $h->{attempt_result};
my $attempt_code_params = $h->{attempt_parameters};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Activator/DB.pm view on Meta::CPAN
$sql ||= '';
$bind ||= [];
if ( ref( $bind ) eq 'ARRAY' ) {
my @vals = @$bind;
map {
if ( !defined($_) ) {
$_ = 'NULL';
}
else {
$_ = "'$_'";
lib/Activator/DB.pm view on Meta::CPAN
];
=item *
C<getall_hashrefs()> returns an arrayref of of rows represented by
hashrefs of column name => value mappings.
$rowrefs is [ { col1 => val, col2 => val },
{ col1 => val, col2 => val },
];
view all matches for this distribution
view release on metacpan or search on metacpan
lib/ActiveRecord/Simple.pm view on Meta::CPAN
my $table_name = _what_is_the_table_name($self);
my @field_names = grep { defined $param->{$_} } sort keys %$param;
my $primary_key = ($self->can('_get_primary_key')) ? $self->_get_primary_key :
($self->can('_get_secondary_key')) ? $self->_get_secondary_key : undef;
my $field_names_str = join q/, /, map { q/"/ . $_ . q/"/ } @field_names;
my (@bind, @values_list);
for (@field_names) {
if (ref $param->{$_} eq 'SCALAR') {
push @values_list, ${ $param->{$_} };
lib/ActiveRecord/Simple.pm view on Meta::CPAN
}
sub _delete_keys {
my ($self, $rx) = @_;
map { delete $self->{$_} if $_ =~ $rx } keys %$self;
}
sub _append_relation {
my ($class, $rel_name, $rel_hashref) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
# Normalise multipart versions
$s =~ s/(\.)(\d{1,3})/sprintf("$1%03d",$2)/eg;
}
$s =~ s/^(\d+)\.?//;
my $l = $1 || 0;
my @v = map {
$_ . '0' x (3 - length $_)
} $s =~ /(\d{1,3})\D?/g;
$l = $l . '.' . join '', @v if @v;
return $l + 0;
}
view all matches for this distribution