view release on metacpan or search on metacpan
t/00-load.t view on Meta::CPAN
use Test::More;
plan tests => 1;
BEGIN {
use_ok( 'Acme::ARUHI::Utils' ) || print "Bail out!\n";
}
diag( "Testing Acme::ARUHI::Utils $Acme::ARUHI::Utils::VERSION, Perl $], $^X" );
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-load.t view on Meta::CPAN
use strict;
use warnings;
use Test::More 0.62 tests => 1;
BEGIN {
use_ok( 'Acme::AXP::Utils' ) || print "Bail out!\n";
}
diag( "Testing Acme::AXP::Utils $Acme::AXP::Utils::VERSION, Perl $], $^X" );
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-load.t view on Meta::CPAN
#!perl -T
use Test::More tests => 1;
BEGIN {
use_ok( 'Acme::AbhiIsNot' ) || print "Bail out!\n";
}
diag( "Testing Acme::AbhiIsNot $Acme::AbhiIsNot::VERSION, Perl $], $^X" );
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
}
sub _write {
local *FH;
open FH, "> $_[0]" or die "open($_[0]): $!";
foreach ( 1 .. $#_ ) { print FH $_[$_] or die "print($_[0]): $!" }
close FH or die "close($_[0]): $!";
}
sub _version ($) {
my $s = shift || 0;
view all matches for this distribution
view release on metacpan or search on metacpan
that you may choose to grant warranty protection to some or all
third parties, at your option).
c) If the modified program normally reads commands interactively when
run, you must cause it, when started running for such interactive use
in the simplest and most usual way, to print or display an
announcement including an appropriate copyright notice and a notice
that there is no warranty (or else, saying that you provide a
warranty) and that users may redistribute the program under these
conditions, and telling the user how to view a copy of this General
Public License.
view all matches for this distribution
view release on metacpan or search on metacpan
eg/permutations view on Meta::CPAN
importance => $importance,
me => $v->[0],
you => $v->[1],
);
# print $n, '. ', $affinity->score, "\n";
$scores{ $affinity->score }++;
}
$n = 0;
for my $score ( sort { $a <=> $b } keys %scores ) {
print ++$n, '. ', $score, ' => ', $scores{$score}, "\n";
}
sub get_responses {
my ( $question, $importance ) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Aheui.pm view on Meta::CPAN
}
sub _output_number {
my ($self, $number) = @_;
print $number;
}
sub _output_code_as_character {
my ($self, $code) = @_;
my $unichar = pack 'U', $code;
print encode($self->{_encoding}, $unichar);
}
sub _get_input_character_as_code {
my ($self) = @_;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
eval( $] >= 5.006 ? <<'END_NEW' : <<'END_OLD' ); die $@ if $@;
sub _write {
local *FH;
open( FH, '>', $_[0] ) or die "open($_[0]): $!";
foreach ( 1 .. $#_ ) {
print FH $_[$_] or die "print($_[0]): $!";
}
close FH or die "close($_[0]): $!";
}
END_NEW
sub _write {
local *FH;
open( FH, "> $_[0]" ) or die "open($_[0]): $!";
foreach ( 1 .. $#_ ) {
print FH $_[$_] or die "print($_[0]): $!";
}
close FH or die "close($_[0]): $!";
}
END_OLD
inc/Module/Install.pm view on Meta::CPAN
sub _version ($) {
my $s = shift || 0;
my $d =()= $s =~ /(\.)/g;
if ( $d >= 2 ) {
# 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 $_)
view all matches for this distribution
view release on metacpan or search on metacpan
eg/sample.pl view on Meta::CPAN
use Acme::AjiFry::EN;
my $ajifry = Acme::AjiFry->new();
my $ajifry_en = Acme::AjiFry::EN->new();
print $ajifry->translate_to_ajifry('ãããã¿')."\n";
print $ajifry->translate_from_ajifry('é£ãã¢ã¸ãã©ã¤ãåºèº«é£ãé£ããåºèº«ãããã岡æãããã')."\n";
print $ajifry_en->translate_to_ajifry('012abcABC!!!')."\n";
print $ajifry_en->translate_from_ajifry('京極ãåºèº«äº¬æ¥µãã・・・京極ã¢ã¸ãã©ã¤é£ãé£ãé£ãé£ãããããé£ããåºèº«å±±å²¡ãããã山岡ãåºèº«å±±å²¡ãã・・・!!!')."\n";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Akashic/Records.pm view on Meta::CPAN
package Acme::Akashic::Records;
use warnings;
use strict;
our $VERSION = sprintf "%d.%02d", q$Revision: 0.1 $ =~ /(\d+)/g;
my $records;
$records = \$records;
bless $records, __PACKAGE__;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install.pm view on Meta::CPAN
open( FH, '>', $_[0] ) or die "open($_[0]): $!";
} else {
open( FH, "> $_[0]" ) or die "open($_[0]): $!";
}
foreach ( 1 .. $#_ ) {
print FH $_[$_] or die "print($_[0]): $!";
}
close FH or die "close($_[0]): $!";
}
# _version is for processing module versions (eg, 1.03_05) not
inc/Module/Install.pm view on Meta::CPAN
sub _version ($) {
my $s = shift || 0;
my $d =()= $s =~ /(\.)/g;
if ( $d >= 2 ) {
# 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 $_)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/AlgebraicToRPN.pm view on Meta::CPAN
$tree = $.parser->parse($algebraic);
$rpn = $tree->to_string('prefix');
);
if ($@) {
print STDERR "$.Class - equation didn't parse; did you forget ",
"to add a userFunc?\n";
return undef;
}
$rpn =~ s/\s//g;
lib/Acme/AlgebraicToRPN.pm view on Meta::CPAN
}
sub _Eval {
my ($self, $expr) = @_;
return unless defined $expr;
#print "Evaling $expr\n";
if ($expr =~ /(.+?),(.+)/) {
my $L = $1;
my $R = $2;
if ($L =~ /^\w+$/ && $R =~ /$RE{balanced}{-parens=>'()'}/) {
#print "HERE $L\n";
push(@{$.stack}, $L);
}
}
if ($expr =~ /(\w+)($RE{balanced}{-parens=>'()'})(.*)/) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/AliG.pm view on Meta::CPAN
=head1 SYNOPSIS
echo hello | alig
The above command will print 'allo'.
=head1 DESCRIPTION
This module provides a script called alig. It will translate whatever you
feed it via STDIN from English to Ali G.
view all matches for this distribution
view release on metacpan or search on metacpan
that you may choose to grant warranty protection to some or all
third parties, at your option).
c) If the modified program normally reads commands interactively when
run, you must cause it, when started running for such interactive use
in the simplest and most usual way, to print or display an
announcement including an appropriate copyright notice and a notice
that there is no warranty (or else, saying that you provide a
warranty) and that users may redistribute the program under these
conditions, and telling the user how to view a copy of this General
Public License.
view all matches for this distribution
view release on metacpan or search on metacpan
BEGIN {
use strict; use warnings;
unless(eval q{ use 5.006; 1}) {
print "Perl 5.006 or better required\n";
exit;
}
}
# This file was automatically generated by Dist::Zilla::Plugin::ModuleBuild v6.025.
view all matches for this distribution
view release on metacpan or search on metacpan
that you may choose to grant warranty protection to some or all
third parties, at your option).
c) If the modified program normally reads commands interactively when
run, you must cause it, when started running for such interactive use
in the simplest and most usual way, to print or display an
announcement including an appropriate copyright notice and a notice
that there is no warranty (or else, saying that you provide a
warranty) and that users may redistribute the program under these
conditions, and telling the user how to view a copy of this General
Public License.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/AllThePerlIsAStage.pm view on Meta::CPAN
use strict;
use warnings;
$Acme::AllThePerlIsAStage::VERSION = '0.01';
BEGIN { print __PACKAGE__ . " - And so it BEGINs ⦠(\${^GLOBAL_PHASE} is '${^GLOBAL_PHASE}')\n" }
use Acme::AllThePerlIsAStage::AndAllTheMenAndWomenJAPH;
# TODO v0.02: functions
# use Acme::AllThePerlIsAStage::AndAllTheMenAndWomenJAPH 'set_at_begin_via_import';
lib/Acme/AllThePerlIsAStage.pm view on Meta::CPAN
}
# Since we are doing BEGIN blocks that call this we need it first:
sub _say_stage {
my ($name) = @_;
print caller() . " - $name (\${^GLOBAL_PHASE} is '${^GLOBAL_PHASE}')\n";
return unless $ENV{'AllThePerlIsAStage_verbose'};
# TODO v0.02: test that this does not change results
# TODO v0.02: eval if callable w/and w/out parens?
# print "\t set_at_begin() is " . (defined &set_at_begin) ? "defined" : "not defined";
# print "\tset_at_global() is " . (defined &set_at_global) ? "defined" : "not defined";
# set_at_begin_via_import
# set_at_begin_via_block
# set_at_begin_via_sub_defined_at_global
# set_at_begin_via_sub_defined_at_global
# set_at_begin
lib/Acme/AllThePerlIsAStage.pm view on Meta::CPAN
)
) {
no strict 'refs'; ## no critic
my $val = defined ${$var} ? "'${$var}'" : 'undef() (i.e. not initialized at this point)';
my $spacing = " " x ( 22 - length($var) );
print "\t\$$var$spacing is $val\n";
}
print "\n";
}
#### now the meat and potatoes ##
_say_stage("Global Scope 1");
view all matches for this distribution
view release on metacpan or search on metacpan
that you may choose to grant warranty protection to some or all
third parties, at your option).
c) If the modified program normally reads commands interactively when
run, you must cause it, when started running for such interactive use
in the simplest and most usual way, to print or display an
announcement including an appropriate copyright notice and a notice
that there is no warranty (or else, saying that you provide a
warranty) and that users may redistribute the program under these
conditions, and telling the user how to view a copy of this General
Public License.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Ane.pm view on Meta::CPAN
use Acme::Ane;
my $ane = Acme::Ane->new($your_object)
if ($ane->is_ane) {
print "$ane is ane\n";
}
Other way
use Acme::Ane "ane";
view all matches for this distribution
view release on metacpan or search on metacpan
that you may choose to grant warranty protection to some or all
third parties, at your option).
c) If the modified program normally reads commands interactively when
run, you must cause it, when started running for such interactive use
in the simplest and most usual way, to print or display an
announcement including an appropriate copyright notice and a notice
that there is no warranty (or else, saying that you provide a
warranty) and that users may redistribute the program under these
conditions, and telling the user how to view a copy of this General
Public License.
view all matches for this distribution
view release on metacpan or search on metacpan
part contains or is derived from the Program or any part thereof, to be licensed
as a whole at no charge to all third parties under the terms of this License.
c) If the modified program normally reads commands interactively when run, you
must cause it, when started running for such interactive use in the most ordinary
way, to print or display an announcement including an appropriate copyright
notice and a notice that there is no warranty (or else, saying that you provide a
warranty) and that users may redistribute the program under these conditions,
and telling the user how to view a copy of this License. (Exception: if the
Program itself is interactive but does not normally print such an announcement,
your work based on the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If identifiable
sections of that work are not derived from the Program, and can be reasonably
considered independent and separate works in themselves, then this License,
and its terms, do not apply to those sections when you distribute them as
view all matches for this distribution
view release on metacpan or search on metacpan
#!/usr/bin/env perl
use strict;
use warnings;
print "The great new Acme::App::Broken!\n";
view all matches for this distribution
view release on metacpan or search on metacpan
bin/mboxextract view on Meta::CPAN
use Acme::Archive::Mbox;
use File::Spec;
use File::Slurp;
use File::Path qw(mkpath);
print "$0 archive.mbox dir/\n" and exit unless @ARGV == 2;
my $archivename = shift @ARGV;
my $rootdir = shift @ARGV;
my $archive = Acme::Archive::Mbox->new();
$archive->read($archivename);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Array/MaxSize.pm view on Meta::CPAN
use Acme::Array::MaxSize;
tie my @short, 'Acme::Array::MaxSize', 3;
@short = (1 .. 10);
print "@short"; # 1 2 3
=head1 DETAILS
When adding new elements, if the maximal size is reached, all other
elements are thrown away.
tie my @short, 'Acme::Array::MaxSize', 3;
@short = ('a');
push @short, 'b' .. 'h';
print "@short"; # a b c
Inserting elements at the B<very beginning> behaves differently,
though. Each C<unshift> or C<splice> would insert the maximal possible
number of elements B<at the end> of the inserted list:
tie my @short, 'Acme::Array::MaxSize', 3;
@short = ('a');
unshift @short, 'b' .. 'h';
print "@short"; # g h a
=head1 AUTHOR
E. Choroba, C<< <choroba at cpan.org> >>
view all matches for this distribution
view release on metacpan or search on metacpan
examples/camel view on Meta::CPAN
$_='ev
al("seek\040D
ATA,0, 0;");foreach(1..3)
{<DATA>;}my @camel1hump;my$camel;
my$Camel ;while( <DATA>){$_=sprintf("%-6
9s",$_);my@dromedary 1=split(//);if(defined($
_=<DATA>)){@camel1hum p=split(//);}while(@dromeda
ry1){my$camel1hump=0 ;my$CAMEL=3;if(defined($_=shif
t(@dromedary1 ))&&/\S/){$camel1hump+=1<<$CAMEL;}
$CAMEL--;if(d efined($_=shift(@dromedary1))&&/\S/){
examples/camel view on Meta::CPAN
defined($_=shift(@camel1hump))&&/\S/){$camel1hump+=1<<$CAME
L;;}$camel.=(split(//,"\040..m`{/J\047\134}L^7FX"))[$camel1h
ump];}$camel.="\n";}@camel1hump=split(/\n/,$camel);foreach(@
camel1hump){chomp;$Camel=$_;y/LJF7\173\175`\047/\061\062\063\
064\065\066\067\070/;y/12345678/JL7F\175\173\047`/;$_=reverse;
print"$_\040$Camel\n";}foreach(@camel1hump){chomp;$Camel=$_;y
/LJF7\173\175`\047/12345678/;y/12345678/JL7F\175\173\0 47`/;
$_=reverse;print"\040$_$Camel\n";}';;s/\s*//g;;eval; eval
("seek\040DATA,0,0;");undef$/;$_=<DATA>;s/\s*//g;( );;s
;^.*_;;;map{eval"print\"$_\"";}/.{4}/g; __DATA__ \124
\1 50\145\040\165\163\145\040\157\1 46\040\1 41\0
40\143\141 \155\145\1 54\040\1 51\155\ 141
\147\145\0 40\151\156 \040\141 \163\16 3\
157\143\ 151\141\16 4\151\1 57\156
\040\167 \151\164\1 50\040\ 120\1
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/AsciiArtFarts.pm view on Meta::CPAN
use Acme::AsciiArtFarts;
my $aaf = Acme::AsciiArtFarts->new();
my $current = $aaf->current();
print $current;
=head1 METHODS
=head2 new
lib/Acme/AsciiArtFarts.pm view on Meta::CPAN
return $self
}
=head2 current
print $aaf->current();
Returns the current strip.
=cut
lib/Acme/AsciiArtFarts.pm view on Meta::CPAN
return $_[0]->__request('/today.txt')
}
=head2 random
print $aaf->random();
Returns a random strip.
=cut
lib/Acme/AsciiArtFarts.pm view on Meta::CPAN
return __parse($_[0]->__request('/random.cgi'));
}
=head2 list_keywords
print join " ", $aaf->list_keywords();
Returns a list of all keywords by which strips are sorted.
=cut
lib/Acme/AsciiArtFarts.pm view on Meta::CPAN
return @{$self->{keywords}{$keyword}{strips}};
}
=head2 get_by_num
print $aaf->get_by_num($art[0]);
print $aaf->get_by_num(int rand 1000);
Given a strip number as returned by other methods, return the requested strip.
Alternately, given an integer value that is a valid strip number, return the requested strip.
view all matches for this distribution
view release on metacpan or search on metacpan
ascii-art.pl view on Meta::CPAN
${_}="rst";;;;;;;
while(<>){print
"Hello",", ",
"world!\n"
if /st/;}
#######
#####
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/AsciiEmoji.pm view on Meta::CPAN
=head1 SYNOPSIS
use Acme::AsciiEmoji;
...
print innocent;
# Êâ¿Ê
=cut
=head1 EXPORT
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/AtIncPolice.pm view on Meta::CPAN
return unless grep lc($class) eq lc($_) , @{$op->{use}};
# create warning message
my $watch_msg = '';
my $msg = $self->_output_message($class, $value, \%args);
if(defined $self->{options}->{pkg}){
$watch_msg = sprintf("%s:: %s", @{$self->{options}}{qw/pkg var/});
} else {
$msg =~ s/^ => // if $msg;
}
if ($msg) {
croak $watch_msg . $msg . "\n";
view all matches for this distribution
view release on metacpan or search on metacpan
that you may choose to grant warranty protection to some or all
third parties, at your option).
c) If the modified program normally reads commands interactively when
run, you must cause it, when started running for such interactive use
in the simplest and most usual way, to print or display an
announcement including an appropriate copyright notice and a notice
that there is no warranty (or else, saying that you provide a
warranty) and that users may redistribute the program under these
conditions, and telling the user how to view a copy of this General
Public License.
view all matches for this distribution