view release on metacpan or search on metacpan
t/00_diag.t view on Meta::CPAN
}
pass 'okay';
my $max = 1;
$max = $_ > $max ? $_ : $max for map { length $_ } @modules;
our $format = "%-${max}s %s";
spacer;
my @keys = sort grep /(MOJO|PERL|\A(LC|HARNESS)_|\A(SHELL|LANG)\Z)/i, keys %ENV;
view all matches for this distribution
view release on metacpan or search on metacpan
t/00_diag.t view on Meta::CPAN
}
pass 'okay';
my $max = 1;
$max = $_ > $max ? $_ : $max for map { length $_ } @modules;
our $format = "%-${max}s %s";
spacer;
my @keys = sort grep /(MOJO|PERL|\A(LC|HARNESS)_|\A(SHELL|LANG)\Z)/i, keys %ENV;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
sub _version ($) {
my $s = shift || 0;
$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;
}
# Cloned from Params::Util::_CLASS
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Free/API/Geodata/GeoIP.pm view on Meta::CPAN
$self->_debuglog("Could not get agent response");
return;
}
my $content = $response->decoded_content;
if(!defined($content) || !length($content)) {
$self->_debuglog("Could not get response content");
return;
}
#$self->_debuglog(Dumper($content));
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Geo/Whitwell/Name.pm view on Meta::CPAN
croak "Bad character or sequencing found in '$original' at '$string'";
}
# Insert the decimal point such that the resulting number is < 180.
# This allows "high-precision" Whitwell names (constructed in some
# manner other than via to_whitwell) to be converted back correctly.
if (length($coord_string) >= 3) {
# Need to insert a decimal point. The final value must be < 180,
# and we asssume at least two decimal places.
# Let's try the easy case first, and insert a decimal point
# right before the last two digits. All names generated via
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Ghost.pm view on Meta::CPAN
# Get UID by User
my $uid = $>; # Effect. UID
if (IS_ROOT) {
if ($user =~ /^(\d+)$/) {
$uid = $user;
} elsif (length($user)) {
$uid = getpwnam($user) || croak "getpwnam failed - $!\n";
}
}
$user = getpwuid($uid || 0) unless length $user;
# Get GID by Group
my $gids = $); # Effect. GIDs
if (IS_ROOT) {
if ($group =~ /^(\d+)$/) {
$gids = $group;
} elsif (length($group)) {
$gids = getgrnam($group) || croak "getgrnam failed - $!\n";
}
}
my $gid = (split /\s+/, $gids)[0]; # Get first GID
$group = getpwuid($gid || 0) unless length $group;
# Check name
croak "Can't create unnamed daemon\n" unless $name;
my $self = bless {
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;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Glue.pm view on Meta::CPAN
=head2 SLU (schwartzian_transform.pl)
#!/usr/bin/env perl
# https://en.wikipedia.org/wiki/Schwartzian_transform
# Sort list of words according to word length
print "$_\n" foreach
map { $_->[0] }
sort { $a->[1] <=> $b->[1] or $a->[0] cmp $b->[0] }
map { [$_, length($_)] }
qw(demo of schwartzian transform);
=head2 LIST OF WORKSHOPS / CONFERENCES
A full list of the workshops and conferences this project was shot at
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;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Gosub.pm view on Meta::CPAN
{
my ($source, $line) = @_;
return $source unless $source =~ /gosub|greturn/;
pos $source = 0;
my $text = "";
component: while (pos $source < length $source)
{
if ($source =~ m/(\G\s*use\s+Acme::Gosub\b)/gc)
{
$text .= q{use Acme::Gosub 'noimport'};
next component;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
$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/Grep2D.pm view on Meta::CPAN
Full Perl regexp is allowed, with a few limitations. Unlike regular
grep, you get back (for each match) an array containing array
references with the following contents:
[$length, $x, $y, $dx, $dy, ??]
Operational note: there is one more argument at the end of the
returned array reference (as indicated by ??). Don't mess with
this. It's reserved for future use.
lib/Acme/Grep2D.pm view on Meta::CPAN
$text = substr($text, $n+1);
}
chomp foreach @text;
my @len;
push(@len, length($_)) foreach @text;
my $maxlen = $len[0];
my $nlines = @text;
#determine max length of each string
map {
$maxlen = $len[$_] if $len[$_] > $maxlen;
} 0..($nlines-1);
# make all lines same length
map {
$text[$_] .= ' ' x ($maxlen-$len[$_]);
} 0..($nlines-1);
#print Dumper(\@text);
lib/Acme/Grep2D.pm view on Meta::CPAN
Find the regular expression ($re) no matter where it occurs in
text.
The difference from a regular grep is that "coordinate" information
is returned for matches. This is the length of the
found match, x and y coordinates, along with
directional movement information (dx, dy).
It's easiest to use B<extract> to access matches.
=cut
lib/Acme/Grep2D.pm view on Meta::CPAN
my $n = 0;
# find things "normally," like a regular grep
foreach (@{$.text}) {
my $text = $_;
while ($text =~/($re)/g) {
push(@matches, [length($1), _start(\$text,$1), $n, 1, 0, \$_])
}
$n++;
};
return @matches;
}
lib/Acme/Grep2D.pm view on Meta::CPAN
foreach (@{$.text}) {
my $text = $_;
$text = ./_reverse($text);
while ($text =~/($re)/g) {
push(@matches,
[length($1), length($text)-(_start(\$text,$1)+1),
$n, -1, 0, \$_])
}
$n++;
};
return @matches;
lib/Acme/Grep2D.pm view on Meta::CPAN
my @matches;
# find things in the vertical vector
foreach (@{$.vertical}) {
my ($text, $coords) = @$_;
my ($x, $y) = @$coords;
push(@matches, [length($1), $x, _start(\$text, $1),
0, 1, \$_]) while ($text =~ /($re)/g);
}
return @matches;
}
lib/Acme/Grep2D.pm view on Meta::CPAN
# find things in the vertical vector
foreach (@{$.vertical}) {
my ($text, $coords) = @$_;
my ($x, $y) = @$coords;
$text = ./_reverse($text);
push(@matches, [length($1),$x, length($text)-_start(\$text, $1)-1,
0, -1, \$_]) while ($text =~ /($re)/g);
}
return @matches;
}
lib/Acme/Grep2D.pm view on Meta::CPAN
foreach (@{$.diagRL}) {
my ($text, $coords) = @$_;
my ($x, $y) = @$coords;
while ($text =~ /($re)/g) {
my $off = _start(\$text, $1);
my $length = length($1);
push(@matches, [$length, $x-$off, $off+$y, -1, 1, \$_]);
}
}
return @matches;
}
lib/Acme/Grep2D.pm view on Meta::CPAN
# find things in the R->L diagonal vector
foreach (@{$.diagRL}) {
my ($text, $coords) = @$_;
my ($x, $y) = @$coords;
$text = ./_reverse($text);
$x -= length($text);
$y += length($text);
$x++;
$y--;
while ($text =~ /($re)/g) {
my $off = _start(\$text, $1);
my $length = length($1);
push(@matches, [$length, $x+$off, $y-$off, 1, -1, \$_]);
}
}
return @matches;
}
lib/Acme/Grep2D.pm view on Meta::CPAN
my ($text, $coords) = @$_;
my ($x, $y) = @$coords;
while ($text =~ /($re)/g) {
my $off = _start(\$text,$1);
push(@matches,
[length($1), $x+$off, $off+$y, 1, 1, \$_])
}
}
return @matches;
}
lib/Acme/Grep2D.pm view on Meta::CPAN
my ($text, $coords) = @$_;
my ($x, $y) = @$coords;
$text = ./_reverse($text);
while ($text =~ /($re)/g) {
my $off = _start(\$text,$1);
my $length = length($1);
$x += length($text);
$y += length($text);
$x--;
$y--;
push(@matches,
[length($1), $x-$off, $y-$off, -1, -1, \$_])
}
}
return @matches;
}
lib/Acme/Grep2D.pm view on Meta::CPAN
=cut
sub extract {
my ($self, $info) = @_;
my ($length, $x, $y, $dx, $dy) = @$info;
my @result;
map {
push(@result, substr($.text->[$y], $x, 1));
$x += $dx;
$y += $dy;
} 1..$length;
return join('', @result);
}
sub _start {
my ($textRef, $one) = @_;
return pos($$textRef) - length($one);
}
=head2 B<text>
$textRef = $g2d->text();
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/GuessNumber.pm view on Meta::CPAN
Many people have this experience: You sit before a gambling table.
You keep placing the bet. You know the Goddess will finally smile at
you. You just don't know when. You have only to wait. As the time
goes by, the bets in your hand become fewer and fewer. You feel the
time goes slower and slower. This lengthy waiting process become
painfully long, like a train running straightforwardly into hell. You
start feeling your whole life is a failure, as the jackpot never
comes...
Hey, why so painfully waiting? The Goddess always smile at you in the
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/HOIGAN.pm view on Meta::CPAN
# Quitar haches intercaladas...
$word =~ s/(\w)H/(rand > 0.30)?"$1":"$1H"/ge;
# haches a principio de palabra empezada en vocal
my $first_letter = substr($word, 0, 1);
if ($vowels->{$first_letter} and length($word) > 1 and rand > 0.60) {
$word = "H$word";
}
$word =~ s/Ñ/(rand > 0.05)?'NI':(rand > 0.20)?'NY':'Ñ'/;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
$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/Honkidasu.pm view on Meta::CPAN
*{'Time::Piece::strftime'} = sub {
my ($self, $format) = @_;
$format =~ s/%%/%%%%/g if ($format);
my $str = POSIX::strftime($format, CORE::localtime $self->epoch);
$str
=~ s/((%*)%(\(|\)))/(length($2) % 2) ? $1 : $2 . $self->honkidasu( ($3 eq ')') ? 1 : 0 )/ge;
$str =~ s/%%/%/g;
return $str;
};
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Hospital/Bed.pm view on Meta::CPAN
sub new {
my ($package, %args) = @_;
$args{total_num_of_rooms} ||= 20;
$args{lifes} ||= 3;
$args{rooms} ||= [];
$args{max_length_of_stay} ||= $args{total_num_of_rooms}*2;
my $self = bless \%args, $package;
unless ($self->{names}) {
$self->{names} = [
qw/rob robert ben tom dean dennis ruby roxy jane michelle larry liane leanne anne axel/
];
lib/Acme/Hospital/Bed.pm view on Meta::CPAN
}
my %patient = $_[0]->_generate_patient();
my @phrases = @{ $_[0]->{phrases}->[$patient{level}] };
my $phrase = $phrases[int(rand(@phrases))];
say(sprintf 'You have %s available rooms', $_[0]->available_rooms);
say( sprintf('The next patients name is: %s. The patient will stay for: %s days.', $patient{name}, $patient{length}));
say($phrase);
my $ans = _wait_answer();
if ($ans eq 'y') {
$patient{level} < 6 ? do {
$_[0]->_lose_a_life();
lib/Acme/Hospital/Bed.pm view on Meta::CPAN
}
sub check_patients_out {
my $i = 0;
for (@{$_[0]->{rooms}}) {
$_->{length}--;
if ($_->{length} == 0) {
splice @{$_[0]->{rooms}}, $i, 1;
say('Patient checked out: ' . $_->{name});
}
$i++;
}
lib/Acme/Hospital/Bed.pm view on Meta::CPAN
sub _generate_patient {
my @names = @{$_[0]->{names}};
return (
name => sprintf('%s %s', map { $names[int(rand(@names))] } 0 .. 1),
level => int(rand(10)),
length => int(rand($_[0]->{max_length_of_stay})) || 1
);
}
sub say {
print $_[0] . "\n";
lib/Acme/Hospital/Bed.pm view on Meta::CPAN
$ahb->available_rooms;
=head2 check_patients_out
This method will itterate the current rooms arrayref, deducting the length of stay by 1 day and will remove (check out) any patients that have reached 0.
$ahb->check_patients_out
=head1 AUTHOR
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
my $cwd = Cwd::cwd();
$Config = [];
my $maxlen = length(
(
sort { length($b) <=> length($a) }
grep { /^[^\-]/ }
map {
ref($_)
? ( ( ref($_) eq 'HASH' ) ? keys(%$_) : @{$_} )
: ''
view all matches for this distribution
view release on metacpan or search on metacpan
t/01-test.t view on Meta::CPAN
'headers' => {
'vary' => 'Accept-Encoding',
'server' => 'nginx/1.10.0 (Ubuntu)',
'connection' => 'keep-alive',
'date' => 'Mon, 13 Mar 2017 15:49:56 GMT',
'content-length' => '178',
'content-type' => 'text/html'
},
'protocol' => 'HTTP/1.1',
'status' => '404',
};});
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/ID/CompanyName.pm view on Meta::CPAN
my $num_words = $args{num_words} // 3;
my $desired_initials = lc($args{desired_initials} // "");
my $add_prefixes = $args{add_prefixes} // 1;
my $add_suffixes = $args{add_suffixes} // 1;
$num_words = length($desired_initials)
if $num_words < length($desired_initials);
my @res;
my $name_tries = 0;
for my $i (1..$num_names) {
die "Can't produce that many unique company names"
lib/Acme/ID/CompanyName.pm view on Meta::CPAN
!$add_prefixes ? 0 :
$has_added_prefix ? 0 :
rand()*$num_words*6 > 1 ? 0 : 1;
my $word;
my $desired_initial = length($desired_initials) >= $j ?
substr($desired_initials, $j-1, 1) : undef;
if (!$will_add_prefix && $desired_initial) {
die "There are no words that start with '$desired_initial'"
unless $Per_Letter_Words{$desired_initial};
view all matches for this distribution
view release on metacpan or search on metacpan
t/01simple.t view on Meta::CPAN
use Test::More tests => 2;
BEGIN { use_ok('Acme::IEnumerable') };
my @sorted = Acme::IEnumerable
->from_list(qw/zzz z zz/)
->order_by(sub { length })
->to_perl;
is_deeply \@sorted, [qw/z zz zzz/];
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/IRC/Art.pm view on Meta::CPAN
croak("les arguments de \'text\' sont le texte, la position x de la première lettre,i".
" la position x de la permière lettre, sa mise en forme, [le fond de couleur du texte]
$syntaxe") if (@_ > 6 or @_ < 4);
croak("Mise en forme : $bolt incorrecte regardez la documentation pour avoir des informations sur la mise en forme") if (!ref $bolt and (length($bolt) > 3 or $bolt !~ /\d/ and $bolt !~ /b/) and @_ == 5);
croak("Un des arguments qui devrai être un nombre de l'est pas
$syntaxe") if ($x !~ /\d/ or $y !~ /\d/);
croak("la valeur de fond spécifié est trop grande") if !ref $fond and $fond > 15;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Indent.pm view on Meta::CPAN
my $data = 0;
for my $l (@lines) {
unless ($data) {
if ($l =~ m{\A (\s*) \S}xms) {
$shft = length($1);
$data = 1;
}
}
if ($data) {
my ($spaces, $text);
if (length($l) >= $shft) {
$spaces = substr($l, 0, $shft);
$text = substr($l, $shft);
}
else {
$spaces = $l;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/InputRecordSeparatorIsRegexp.pm view on Meta::CPAN
}
if ($c eq "(") { $nest++ }
if ($c eq ")") { $nest-- }
if ($nest) { $irs .= $c; }
}
substr($mode,$p0,length($irs)+6, "");
$_[0] = $mode;
return $irs;
}
sub open (*;$@) {
lib/Acme/InputRecordSeparatorIsRegexp.pm view on Meta::CPAN
}
sub EOF {
my $self = shift;
foreach my $rec (@{$self->{records}}, $self->{buffer}) {
return if length($rec) > 0;
}
return eof($self->{handle});
}
sub _split {
lib/Acme/InputRecordSeparatorIsRegexp.pm view on Meta::CPAN
my $rs = $self->{rsc};
my @rec = split $rs, $self->{buffer};
if ($self->{can_use_lookbehind}) {
return @rec;
} else {
return grep length, @rec;
}
}
sub CLOSE {
my $self = shift;
lib/Acme/InputRecordSeparatorIsRegexp.pm view on Meta::CPAN
sub WRITE {
my ($self, $buf, $len, $offset) = @_;
$offset ||= 0;
if (!defined $len) {
$len = length($buf)-$offset;
}
$self->PRINT( substr($buf,$offset,$len) );
}
sub PRINT {
lib/Acme/InputRecordSeparatorIsRegexp.pm view on Meta::CPAN
my $bufref = \$_[0];
my (undef, $len, $offset) = @_;
my $nread = 0;
while ($len > 0 && @{$self->{records}}) {
if (length($self->{records}[0])>=$len) {
my $rec = shift @{$self->{records}};
my $reclen = length($rec);
substr( $$bufref, $offset, $reclen, $rec);
$len -= $reclen;
$offset += $reclen;
$nread += $reclen;
} else {
lib/Acme/InputRecordSeparatorIsRegexp.pm view on Meta::CPAN
$offset += $len;
$nread += $len;
$len = 0;
}
}
if ($len > 0 && length($self->{buffer}) > 0) {
my $reclen = length($self->{buffer});
if ($reclen >= $len) {
my $rec = substr( $self->{buffer}, 0, $len, "" );
substr( $$bufref, $offset, $len, $rec );
$offset += $len;
$nread += $len;
lib/Acme/InputRecordSeparatorIsRegexp.pm view on Meta::CPAN
}
}
sub GETC {
my $self = shift;
if (@{$self->{records}}==0 && 0 == length($self->{buffer})) {
$self->_populate_buffer;
}
if (@{$self->{records}}) {
my $c = substr( $self->{records}[0], 0, 1, "" );
if (0 == length($self->{records}[0])) {
shift @{$self->{records}};
}
return $c;
} elsif (0 != length($self->{buffer})) {
my $c = substr( $self->{buffer}, 0, 1, "" );
return $c;
} else {
# eof?
return undef;
lib/Acme/InputRecordSeparatorIsRegexp.pm view on Meta::CPAN
}
sub TELL {
my $self = shift;
# virtual cursor position is actual position on the file handle
# minus the length of any buffered data
my $tell = tell $self->{handle};
$tell -= length($self->{buffer});
$tell -= length($_) for @{$self->{records}};
return $tell;
}
no warnings 'redefine';
lib/Acme/InputRecordSeparatorIsRegexp.pm view on Meta::CPAN
my $removed = 0;
my $rs = $self->{rs};
foreach my $line (@_) {
$line =~ s/($rs)$//;
if (defined($1)) {
$removed += length($1);
}
}
return $removed;
}
lib/Acme/InputRecordSeparatorIsRegexp.pm view on Meta::CPAN
=head2 bufsize
The amount of data, in bytes, to read from the input stream at
a time. For performance reasons, this should be at least a few kilobytes.
B<For the module to work correctly, it should also be much larger
than the length of any sequence of characters that could be construed
as a line ending.>
=head1 ALIAS
The package C<Acme::IRSRegexp> is an alias for
lib/Acme/InputRecordSeparatorIsRegexp.pm view on Meta::CPAN
READLINE
scalar context
list context
READ
with and without offset
length < = > buffer allocated
before and after populate buffer (i.e., after scalar READLINE)
GETC
with and without populated buffer (after SCALAR READLINE)
at eof
EOF
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;
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
$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/KeyboardMarathon.pm view on Meta::CPAN
#sub distance {
# my $self = shift @_;
# my $distance = Math::BigInt->bzero();
# for my $i (0 .. $#_) {
# croak "FAR OUT! A REFERENCE: $_[$i]" if ref $_[$i];
# my $length = length($_[$i]) - 1;
# for my $s ( 0 .. $length ) {
# my $char = substr($_[$i],$s,1);
# unless ( defined $self->{k}->{$char} ) {
# carp "WHOAH! I DON'T KNOW WHAT THIS IS: [$char] at $s assigning it a 2.5 cm distance\n";
# $self->{k}->{$char} = 250;
# }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/PerlIO/via/LAUTER_DEUTSCHER.pm view on Meta::CPAN
sub WRITE {
my ( $self, $text, $fh ) = @_;
return 0 unless defined $text;
if ( my $out = $self->_translate($text) ) {
print $fh $out;
return length $out;
}
else {
return -1;
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Labs.pm view on Meta::CPAN
my @interjections=qw(NARF POIT ZORT EGAD);
my $interjections=join("|", @interjections); # OR'd list for regexes
our (%zord, %chroz);
my $c=ord("A"); foreach my $w (@interjections) {my $l=length $w; for(my $n=0; $n<2**$l; $n++) {my $narf; my $b=unpack("b$l", chr $n); for my $i (0..$l-1) { $narf.=substr($b, $i, 1)?lc substr($w, $i, 1):uc substr($w, $i, 1); } $chroz{$narf}=chr($c); $...
#----------------------------------------------------------------------
sub AYPWIP
{
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Makefile.pm view on Meta::CPAN
sub clean_files {
my $self = shift;
my $clean = $self->makemaker_args->{clean} ||= {};
%$clean = (
%$clean,
FILES => join(' ', grep length, $clean->{FILES}, @_),
);
}
sub realclean_files {
my $self = shift;
my $realclean = $self->makemaker_args->{realclean} ||= {};
%$realclean = (
%$realclean,
FILES => join(' ', grep length, $realclean->{FILES}, @_),
);
}
sub libs {
my $self = shift;
view all matches for this distribution