view release on metacpan or search on metacpan
lib/Acme/Free/Advice/Slip.pm view on Meta::CPAN
defined $res->{slip} ? bless $res->{slip}, __PACKAGE__ : ();
}
sub search ($query) {
my $res = _http( 'https://api.adviceslip.com/advice/search/' . $query );
map { bless $_, __PACKAGE__ } @{ $res->{slips} // [] };
}
}
1;
__END__
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Free/Advice/Unsolicited.pm view on Meta::CPAN
defined $res->{error} ? () : bless $res, __PACKAGE__;
}
sub all () {
my $res = _http('https://kk-advice.koyeb.app/api/advice/all');
map { bless $_, __PACKAGE__ } @{ $res // [] };
}
}
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
lib/Acme/Geo/Whitwell/Name.pm view on Meta::CPAN
However, solely for the purposes of amusement, it can be interesting to find
out what a given location would have been called in the alternate universe
where Whitwell's scheme caught on.
It would be lovely to use this module to change all the place names on
online maps, wouldn't it?
=head2 SOURCES
=over
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Globule.pm view on Meta::CPAN
use File::Glob qw( csh_glob );
my $csh_glob = \&csh_glob;
use Module::Load;
# This is a hash mapping packages that use us to the Globule plugins they
# requested.
my %clients;
# This is a hash of plugins that have been pulled in so far, and maps to the
# name of the package that actually implements the plugin.
my %plugins;
sub import {
my($self, @plugins) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Globus.pm view on Meta::CPAN
# else {
# $command = qq{endpoint-list} ;
# }
# my $result
# = _globus_action( $command, $self->{username}, $self->{key_path} ) ;
# my @result = map { ( split m{\s}, $_ )[0] } split "\n", $result ;
# return wantarray ? @result : \@result ;
# }
#lists all my endpoint
sub endpoint_list {
my ($self) = @_ ;
my $command = 'endpoint-search --scope=my-endpoints' ;
my $result
= _globus_action( $command, $self->{username}, $self->{key_path} ) ;
my @result = map { s{\s}{}g ; $_ }
map { ( reverse split m{:} )[0] }
grep {m{Legacy}}
split m{\n}, $result ;
return wantarray ? @result : \@result ;
}
lib/Acme/Globus.pm view on Meta::CPAN
my ( $self, $search ) = @_ ;
return {} unless $search ;
my $command = qq{endpoint-search $search --scope=my-endpoints} ;
my $result
= _globus_action( $command, $self->{username}, $self->{key_path} ) ;
my %result = map {
chomp ;
my ( $k, $v ) = split m{\s*:\s}, $_ ;
$k => $v
}
split m{\n}, $result ;
lib/Acme/Globus.pm view on Meta::CPAN
sub list_my_endpoints {
my ($self) = @_ ;
my $command = 'endpoint-search --scope=my-endpoints' ;
my $result
= _globus_action( $command, $self->{username}, $self->{key_path} ) ;
my %result = map {
my $hash ;
%$hash = map {
my ( $k, $v ) = split m{\s*:\s*} ;
$k =~ s{\s+}{_}gmx ;
$k = lc $k ;
$k => $v
}
lib/Acme/Globus.pm view on Meta::CPAN
my ( $self, $search ) = @_ ;
my %result ;
my $command = qq{endpoint-search $search --scope=my-endpoints} ;
my $result
= _globus_action( $command, $self->{username}, $self->{key_path} ) ;
%result = map {
my $hash ;
%$hash = map {
my ( $k, $v ) = split m{\s*:\s*} ;
$k =~ s{\s+}{_}gmx ;
$k = lc $k ;
$k => $v
}
lib/Acme/Globus.pm view on Meta::CPAN
my ( $self, $endpoint ) = @_ ;
my $command = qq{endpoint-details $endpoint} ;
my $result
= _globus_action( $command, $self->{username}, $self->{key_path} ) ;
my %result = map {
chomp ;
my ( $key, $value ) = split m{\s*:\s*}, $_ ;
$key => $value
} split m{\n}, $result ;
lib/Acme/Globus.pm view on Meta::CPAN
my ($self) = @_ ;
my $command = qq{profile} ;
my $result
= _globus_action( $command, $self->{username}, $self->{key_path} ) ;
my %output
= map { my ( $k, $v ) = split m{:\s?}, $_ ; $k => $v } split m{\n},
$result ;
return wantarray ? %output : \%output ;
}
sub help { }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Glue.pm view on Meta::CPAN
#
# transform an array of hashes into an array of arrays where each array
# contains the values from the hash sorted by the original hash keys or
# the passed order of columns (hash slicing)
my @ordered = $column_order
? map { [ @$_{ @{ $column_order } } ] } @{ $chaos }
: map { [ @$_{sort keys %$_} ] } @{ $chaos };
=head2 LEEJO (hopscotch.p6)
#!/usr/bin/env perl6
lib/Acme/Glue.pm view on Meta::CPAN
my $skip = @court.[1..*].pick.pick;
my @play;
for @court.reverse -> $hop {
@play.push( $hop.map( *.subst( /^$skip$/,'ð«' ).list ) );
}
say @play.reverse.join( "\n" );
=head2 LEEJO (vec and pack examples from perldoc vec)
lib/Acme/Glue.pm view on Meta::CPAN
#!/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
lib/Acme/Goatse.pm view on Meta::CPAN
return $_;
}
sub pad_line {
return join '',map{"$_ "}split //, shift;
}
__END__
=head1 NAME
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
scripts/tag-release.pl view on Meta::CPAN
use warnings;
use IO::All;
my ($version) =
(map { m{\$VERSION *= *'([^']+)'} ? ($1) : () }
io->file('lib/Acme/Gosub.pm')->getlines()
)
;
if (!defined ($version))
view all matches for this distribution
view release on metacpan or search on metacpan
*
* The result will be a list of patches suggesting changes that should at
* least be acceptable, if not necessarily the most efficient solution, or a
* fix for all possible problems. It won't catch where dTHR is needed, and
* doesn't attempt to account for global macro or function definitions,
* nested includes, typemaps, etc.
*
* In order to test for the need of dTHR, please try your module under a
* recent version of Perl that has threading compiled-in.
*
*/
$macros{$1} = 1 if /^#\s*define\s+([a-zA-Z0-9_]+)/;
$replace = $1 if /Replace:\s+(\d+)/;
$badmacros{$2}=$1 if $replace and /^#\s*define\s+([a-zA-Z0-9_]+).*?\s+([a-zA-Z0-9_]+)/;
$badmacros{$1}=$2 if /Replace (\S+) with (\S+)/;
}
foreach $filename (map(glob($_),@ARGV)) {
unless (open(IN, "<$filename")) {
warn "Unable to read from $file: $!\n";
next;
}
print "Scanning $filename...\n";
}
}
if (scalar(keys %add_func) or $need_include != $has_include) {
if (!$has_include) {
$inc = join('',map("#define NEED_$_\n", sort keys %add_func)).
"#include \"ppport.h\"\n";
$c = "$inc$c" unless $c =~ s/#.*include.*XSUB.*\n/$&$inc/m;
} elsif (keys %add_func) {
$inc = join('',map("#define NEED_$_\n", sort keys %add_func));
$c = "$inc$c" unless $c =~ s/^.*#.*include.*ppport.*$/$inc$&/m;
}
if (!$need_include) {
print "Doesn't seem to need ppport.h.\n";
$c =~ s/^.*#.*include.*ppport.*\n//m;
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/Grep2D.pm view on Meta::CPAN
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);
my @diagLR;
lib/Acme/Grep2D.pm view on Meta::CPAN
for (my $char=0; $char < $maxlen; $char++) {
my @d;
$x = $char;
my $y = 0;
my @origin = ($x, $y);
map {
if ($y < $nlines && $x < $maxlen) {
my $char = substr($text[$y], $x, 1);
push(@d, $char) if defined $char;
}
$x++;
lib/Acme/Grep2D.pm view on Meta::CPAN
for (my $line=1; $line < $nlines; $line++) {
my @d;
$x = 0;
my $y = $line;
my @origin = ($x, $y);
map {
if ($y < $nlines && $x < $maxlen) {
my $char = substr($text[$y], $x, 1);
push(@d, $char) if defined $char;
}
$x++;
lib/Acme/Grep2D.pm view on Meta::CPAN
for (my $char=0; $char < $maxlen; $char++) {
my @d;
$x = $char;
my $y = 0;
my @origin = ($x, $y);
map {
if ($y < $nlines && $x >= 0) {
my $char = substr($text[$y], $x, 1);
push(@d, $char) if defined $char;
}
$x--;
lib/Acme/Grep2D.pm view on Meta::CPAN
for (my $line=1; $line < $nlines; $line++) {
my @d;
$x = $maxlen-1;
my $y = $line;
my @origin = ($x, $y);
map {
if ($y < $nlines && $x >= 0) {
my $char = substr($text[$y], $x, 1);
push(@d, $char) if defined $char;
}
$x--;
lib/Acme/Grep2D.pm view on Meta::CPAN
unshift(@d, \@origin);
push(@vertical, \@d);
}
# correct LR to make text greppable
map {
my ($coords, @text) = @$_;
my $text = join('', @text);
$_ = [$text, $coords];
} @diagLR;
# correct RL to make text greppable
map {
my ($coords, @text) = @$_;
my $text = join('', @text);
$_ = [$text, $coords];
} @diagRL;
# correct vertical to make text greppable
map {
my ($coords, @text) = @$_;
my $text = join('', @text);
$_ = [$text, $coords];
} @vertical;
$.diagLR = \@diagLR;
lib/Acme/Grep2D.pm view on Meta::CPAN
Extract pattern match described by $info, which is a single return
from B<Grep>. E.g.
my @matches = $g2d->Grep(qr(foo\w+));
map {
print "Matched ", $g2d->extract($_), "\n";
} @matches;
=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);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Has/Tiny.pm view on Meta::CPAN
{
no strict qw(refs);
my $me = shift;
my $caller = caller;
my %want = map +($_ => 1), @_;
if ($want{has})
{
*{"$caller\::has"} = sub { unshift @_, __PACKAGE__; goto \&has };
}
lib/Acme/Has/Tiny.pm view on Meta::CPAN
sub assert_valid
{
my $me = shift;
my ($class, $hash) = @_;
my @validator = map {
$VALIDATORS{$_} ||= $me->_compile_validator($_, $ATTRIBUTES{$_});
} $me->_find_parents($class);
$_->($hash) for @validator;
return $hash;
lib/Acme/Has/Tiny.pm view on Meta::CPAN
if ($spec->{default})
{
push @code, sprintf(
'exists($self->{%s}) or $self->{%s} = $Acme::Has::Tiny::ATTRIBUTES{%s}{%s}{default}->();',
map perlstring($_), $a, $a, $class, $a,
);
}
elsif ($spec->{required})
{
push @code, sprintf(
'exists($self->{%s}) or Acme::Has::Tiny::_croak("Attribute %%s is required by %%s", %s, %s);',
map perlstring($_), $a, $a, $class,
);
}
my $isa = $spec->{isa};
if (blessed($isa) and $isa->can_be_inlined)
lib/Acme/Has/Tiny.pm view on Meta::CPAN
}
elsif ($isa)
{
push @code, (
sprintf('if (exists($self->{%s})) {', $a),
sprintf('$Acme::Has::Tiny::ATTRIBUTES{%s}{%s}{isa}->($self->{%s});', map perlstring($_), $class, $a, $a),
'}',
);
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Hello/I18N.pm view on Meta::CPAN
File::Basename::basename($lexicon) =~ /^(\w+).po$/ or next;
push @languages, $1;
};
Locale::Maketext::Lexicon->import( {
map { lc($_) => [Gettext => "$path$name/$_.po"] } @languages
} );
}
else {
@ISA = 'Acme::Hello::I18N::_stub';
}
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/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
);
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
use vars qw{$VERSION};
BEGIN {
$VERSION = '1.03';
}
# special map on pre-defined feature sets
my %FeatureMap = (
'' => 'Core Features', # XXX: deprecated
'-core' => 'Core Features',
);
inc/Module/AutoInstall.pm view on Meta::CPAN
my $maxlen = length(
(
sort { length($b) <=> length($a) }
grep { /^[^\-]/ }
map {
ref($_)
? ( ( ref($_) eq 'HASH' ) ? keys(%$_) : @{$_} )
: ''
}
map { +{@args}->{$_} }
grep { /^[^\-]/ or /^-core$/i } keys %{ +{@args} }
)[0]
);
while ( my ( $feature, $modules ) = splice( @args, 0, 2 ) ) {
inc/Module/AutoInstall.pm view on Meta::CPAN
if (
defined( my $cur = _version_check( _load($mod), $arg ||= 0 ) ) )
{
print "loaded. ($cur" . ( $arg ? " >= $arg" : '' ) . ")\n";
push @Existing, $mod => $arg;
$DisabledTests{$_} = 1 for map { glob($_) } @skiptests;
}
else {
print "missing." . ( $arg ? " (would need $arg)" : '' ) . "\n";
push @required, $mod => $arg;
}
inc/Module/AutoInstall.pm view on Meta::CPAN
) =~ /^[Yy]/
)
)
{
push( @Missing, @required );
$DisabledTests{$_} = 1 for map { glob($_) } @skiptests;
}
elsif ( !$SkipInstall
and $default
and $mandatory
and
_prompt( qq{==> The module(s) are mandatory! Really skip?}, 'n', )
=~ /^[Nn]/ )
{
push( @Missing, @required );
$DisabledTests{$_} = 1 for map { glob($_) } @skiptests;
}
else {
$DisabledTests{$_} = 1 for map { glob($_) } @tests;
}
}
$UnderCPAN = _check_lock(); # check for $UnderCPAN
inc/Module/AutoInstall.pm view on Meta::CPAN
sub install {
my $class = shift;
my $i; # used below to strip leading '-' from config keys
my @config = ( map { s/^-// if ++$i; $_ } @{ +shift } );
my ( @modules, @installed );
while ( my ( $pkg, $ver ) = splice( @_, 0, 2 ) ) {
# grep out those already installed
inc/Module/AutoInstall.pm view on Meta::CPAN
}
$args{test}{TESTS} ||= 't/*.t';
$args{test}{TESTS} = join( ' ',
grep { !exists( $DisabledTests{$_} ) }
map { glob($_) } split( /\s+/, $args{test}{TESTS} ) );
my $missing = join( ',', @Missing );
my $config =
join( ',', UNIVERSAL::isa( $Config, 'HASH' ) ? %{$Config} : @{$Config} )
if $Config;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/ID/CompanyName.pm view on Meta::CPAN
maju
makmur
maksindo
mandala
mandiri
mapan
marga
maritim
mas
media
megah
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/IEnumerable.pm view on Meta::CPAN
local $_ = $$item;
my $key = $key_extractor->($_);
push @{ $temp{$key} }, $_;
}
my @temp = map {
Acme::IEnumerable::Grouping->from_list($_, @{$temp{$_}})
} keys %temp;
return Acme::IEnumerable->from_list(@temp)->new;
};
lib/Acme/IEnumerable.pm view on Meta::CPAN
};
}
push @{ $list[-1]->{value} }, $_;
}
my @temp = map {
Acme::IEnumerable::Grouping->from_list($_->{key}, @{ $_->{value} })
} @list;
return Acme::IEnumerable->from_list(@temp)->new;
};
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/IRC/Art.pm view on Meta::CPAN
=cut
sub result {
my ($this) = shift;
use Data::Dumper;
return map {join '',@{$_}} @{$this->{canevas}};
}
=head1 Methodes
view all matches for this distribution
view release on metacpan or search on metacpan
my $oos = Acme::Incorporated::out_of_stock( 'foobar', 'foo/bar.pm' );
like( <$oos>, qr/print.+foobar is out of stock/,
'out_of_stock() should print an out of stock message' );
ok( ! $INC{'foo/bar.pm'}, '... not populating %INC for module' );
my @breaks = map { Acme::Incorporated::breaks() ? 1 : () } 1 .. 1000;
cmp_ok( @breaks, '>', 75,
'breaks() should be true more than 7.5% of the time' );
cmp_ok( @breaks, '<', 125,
'... and false less than 12.5% of the time' );
my @subs = map { Acme::Incorporated::bad_product() } 1 .. 2000;
my @empty = grep { $_ == \&Acme::Incorporated::empty_box } @subs;
cmp_ok( @empty, '>', 150,
'empty_box() should be called more than 7.5% of the time' );
cmp_ok( @empty, '<', 250,
'... and less than 12.5% of the time' );
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Insult.pm view on Meta::CPAN
use parent 'Exporter';
use Module::Load;
our %EXPORT_TAGS = ( all => [ our @EXPORT_OK = qw[insult flavors] ] );
#
my %flavor = (
map {
my $pkg = 'Acme::Insult::' . $_;
( eval 'require ' . $pkg ? ( lc($_) => $pkg ) : () ),
} qw[Glax Evil Pirate]
);
view all matches for this distribution
view release on metacpan or search on metacpan
A => iota(ord('A')),
B => iota,
C => iota,
};
my ($two, $four, $six) = map { 2 * $_ } iota(1), iota, iota;
ok A == ord('A');
ok B == ord('B');
ok C == ord('C');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Tie/Cycle.pm view on Meta::CPAN
}
sub STORE {
my( $self, $list_ref ) = @_;
return unless ref $list_ref eq ref [];
my @shallow_copy = map { $_ } @$list_ref;
$self->[CURSOR_COL] = 0;
$self->[COUNT_COL] = scalar @shallow_copy;
$self->[ITEM_COL] = \@shallow_copy;
}
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
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/JavaTrace.pm view on Meta::CPAN
CORE::die @_ if ref $_[0] and not $options{showrefs};
CORE::die @_ if index($_[0], "\n\tat ") >= 0;
my @args = @_;
_use_data_dumper() if ref $args[0];
my $msg = join '', map { ref $_ ? "Caught exception object: $_\: ".Dumper($_) : $_ } @args;
$msg =~ s/ at (.+?) line (\d+)\.$//;
$stderr .= $msg;
$stderr .= "\n" if substr($msg, -1, 1) ne "\n";
_stack_trace($1, $2);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/KeyboardMarathon.pm view on Meta::CPAN
# horizontal distances
$self->{k} = {};
no warnings 'qw';
map { $self->{k}->{$_} = 550 } ( '\\', '|' );
map { $self->{k}->{$_} = 500 } ( qw/6 ^ ` ~/ );
map { $self->{k}->{$_} = 450 } ( qw/= +/ );
map { $self->{k}->{$_} = 400 } ( qw/] 1 2 3 4 7 8 9 0 5 - _ ! @ # $ % & * ( ) }/ );
map { $self->{k}->{$_} = 350 } ( qw/B b/ );
map { $self->{k}->{$_} = 230 } ( qw/[ {/ );
map { $self->{k}->{$_} = 200 } ( qw/Q q W w G g H h E e R r T t Y y U u I i O o P p Z z X x C c V v N n M m , < > . \/ ? ' "/ );
map { $self->{k}->{$_} = 0 } ( qw/A a S s D d F f J j K k L l ; :/ );
if ($layout eq 'dvorak') {
map { $self->{k}->{$_} = 550 } ( '\\', '|' );
map { $self->{k}->{$_} = 500 } ( qw/6 ^ ` ~/ );
map { $self->{k}->{$_} = 450 } ( qw/] }/ );
map { $self->{k}->{$_} = 400 } ( qw/+ = 1 2 3 4 7 8 9 0 5 [ { ! @ # $ % & * ( )/ );
map { $self->{k}->{$_} = 350 } ( qw/X x/ );
map { $self->{k}->{$_} = 230 } ( qw/? \// );
map { $self->{k}->{$_} = 200 } ( qw/" ' < , I i D d > . P p Y y F f G g C c R r L l : ; Q q J j K k B b M m W w V v Z z - _/ );
map { $self->{k}->{$_} = 0 } ( qw/A a O o E e U u H h T t N n S s/ );
}
$self->{k}->{"\n"} = 400;
$self->{k}->{"\t"} = 230;
$self->{k}->{' '} = 0;
view all matches for this distribution
view release on metacpan or search on metacpan
Makefile.PL view on Meta::CPAN
}
else {
print "Skipping network tests.\n";
}
$config{test} = { TESTS => join ' ', map {glob} @patterns };
WriteMakefile(%config);
view all matches for this distribution