view release on metacpan or search on metacpan
lib/Acme/Free/API/Ye.pm view on Meta::CPAN
After installing this module, simply run the command C<ye> without any arguments, and it will print
a random Kanye Rest quote to C<STDOUT>.
shell> ye
If I don't scream, if I don't say something then no one's going to say anything.
shell> ye
Culture is the most powerful force in humanity under God
shell>
=head1 DESCRIPTION
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Free/Advice/Slip.pm view on Meta::CPAN
Acme::Free::Advice::Slip - Seek Advice from the Advice Slip API
=head1 SYNOPSIS
use Acme::Free::Advice::Slip qw[advice];
say advice( 224 )->{advice};
=head1 DESCRIPTION
Acme::Free::Advice::Slip provides wisdom from L<AdviceSlip.com|https://adviceslip.com/>.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Free/Advice/Unsolicited.pm view on Meta::CPAN
Acme::Free::Advice::Unsolicited - Solicit Unsolicited Advice from Kevin Kelly
=head1 SYNOPSIS
use Acme::Free::Advice::Unsolicited qw[advice];
say advice( 224 )->{advice};
=head1 DESCRIPTION
Acme::Free::Advice::Unsolicited provides wisdom from author and leading technology observer, L<Kevin
Kelly|https://en.wikipedia.org/wiki/Kevin_Kelly_(editor)>.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Free/Advice.pm view on Meta::CPAN
Acme::Free::Advice - Wise words. Dumb code.
=head1 SYNOPSIS
use Acme::Free::Advice qw[advice];
say advice;
=head1 DESCRIPTION
Acme::Free::Advice spits out advice. Good advice. Bad advice. Advice. It's a fortune cookie.
view all matches for this distribution
view release on metacpan or search on metacpan
}
my $images = $fletch->images( breed => $o->breed );
foreach my $url ( $images->all ) {
say $url;
}
return EXIT_SUCCESS;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Ghost.pm view on Meta::CPAN
=head2 reload
$exit_code = $g->reload; # SIGHUP (by default)
$exit_code = $g->reload('USR2'); # SIGUSR2
$exit_code = $g->reload(12); # SIGUSR2 too
say "Reloading ". $g->pid;
This method performs sending signal to Your daemon and return C<0> as exit code.
This method is primarily intended to perform a daemon reload
=head2 restart
$exit_code = $g->restart;
if ($exit_code) {
say STDERR "Restart failed " . $g->pid;
} else {
say "Restart successful";
}
This method performs restarting the daemon and returns C<0> as successfully
exit code or C<1> in otherwise
=head2 start
my $exit_code = $g->start;
say "Running ". $g->pid;
exit $exit_code;
This method performs starting the daemon and returns C<0> as exit code.
The spawned process calls the startup handler and exits with status C<0>
as exit code without anything return
=head2 status
if (my $runned = $g->status) {
say "Running $runned";
} else {
say "Not running";
}
This method checks the status of running daemon and returns its PID (alive).
The method returns 0 if it is not running (dead).
lib/Acme/Ghost.pm view on Meta::CPAN
if (my $runned = $g->stop) {
if ($runned < 0) {
die "Daemon " . $g->pid ." is still running";
} else {
say "Stopped $runned";
}
} else {
say "Not running";
}
This method performs stopping the daemon and returns:
+PID -- daemon stopped successfully
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Github/Test.pm view on Meta::CPAN
}
sub freep {
my $self = shift;
say "Freep!";
}
sub frobulate {
my $self = shift;
my $quux = shift // 42;
say "$quux has been frobulated!";
return $quux;
}
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Globus.pm view on Meta::CPAN
$ssh->error
and die "Couldn't establish SSH connection: " . $ssh->error ;
my $debug = 0 ;
say STDERR "\t" . '=' x 20 if $debug ;
say STDERR "\t" . $command if $debug ;
say STDERR "\t" . '-' x 20 if $debug ;
my $response = $ssh->capture($command)
or carp "remote command failed: " . $ssh->error ;
return $response ;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Glue.pm view on Meta::CPAN
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)
#!/usr/bin/env perl -wl
view all matches for this distribution
view release on metacpan or search on metacpan
examples/calendar.pl view on Meta::CPAN
sub cal_double_clicked {
my $self = shift;
my ($year, $month, $day) = $self->get_date;
say sprintf("%04d-%02d-%02d", $year, $month + 1, $day);
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Hidek.pm view on Meta::CPAN
$hidek->birthdate; # => 1970/9/2 (Time::Piece object)
$hidek->is_birthday; # true if the day is 9/2
$hidek->age; # the current age (integer)
$hidek->agef; # the current age (float)
$hidek->we_love_hidek(); # => say congratulations to stdout
=head1 DESCRIPTION
Acme::Hidek provides APIs to access the information on hidek.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Holy/Shit/Here/Come/s/An/S.pm view on Meta::CPAN
=head1 'SYNOP'SI'S
use Acme::Holy'Shit::Here::Come's::An'S;
say "It\N{HOLY SHIT HERE COMES AN S}s an 'S!"; # "It's an 'S!"
=head1 DE'SCRIPTION
Thi's module let's you refer to the apo'strophe by it's correct name
C<HOLY SHIT HERE COMES AN S> in the lexical 'scope it's u'sed in.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Honkidasu.pm view on Meta::CPAN
use 5.010;
binmode STDOUT, 'utf8';
use Acme::Honkidasu;
my $time = localtime;
say $time->honkidasu;
say $time->strftime('%F %(');
=head1 DESCRIPTION
Acme::Honkidasu is æ¬æ°åºãã
lib/Acme/Honkidasu.pm view on Meta::CPAN
=head2 honkidasu
use Acme::Honkidasu;
my $time = localtime;
say $time->honkidasu;
say $time->honkidasu(1); # positive
æ¬æ°åºãã
=head1 EXTEND strftime
use Acme::Honkidasu;
my $time = localtime;
say $time->strftime('%F %(');
say $time->strftime('%F %)'); # positive
add conversion specifier character '%(' to æ¬æ°åºãã
=head1 EXAMPLES
lib/Acme/Honkidasu.pm view on Meta::CPAN
my $idx = $time->hour % scalar(@$list);
chomp( my $msg = $list->[$idx] );
return $msg;
};
$Acme::Honkidasu::LIST_HONKIDASU = [<DATA>];
say localtime->honkidasu;
say localtime->strftime('%(');
__DATA__
æ°ããï¼æ¥ãããã¯ãã¾ãã仿¥ããæ¬æ°åºãã
ã¾ã ã¾ã æéã¯ãã£ã·ããããç¦ãã¯ç¦ç©ãï¼æããæ¬æ°åºãã
YouTubeçºãã¦ããæéã®ã¹ãã¼ããããããªãããã¶ãªãã£ãã3æããæ¬æ°åºããã
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Hospital/Bed.pm view on Meta::CPAN
sub next_patient {
$_[0]->check_patients_out;
my $available = $_[0]->available_rooms;
if ($available == 0) {
say('You won this time.');
exit;
}
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();
} : do {
lib/Acme/Hospital/Bed.pm view on Meta::CPAN
my $i = 0;
for (@{$_[0]->{rooms}}) {
$_->{length}--;
if ($_->{length} == 0) {
splice @{$_[0]->{rooms}}, $i, 1;
say('Patient checked out: ' . $_->{name});
}
$i++;
}
}
sub _lose_a_life {
if ($_[0]->{lifes}-- == 0) {
say('GAME OVER!');
exit;
}
say(sprintf 'You lose a life, %s lifes remaining.', $_[0]->{lifes});
}
sub _wait_answer {
say('Should they go to hospital? (y/n) ');
my $answer = <STDIN>;
chomp $answer;
if ($answer !~ m/y|n/) {
return _wait_answer();
}
lib/Acme/Hospital/Bed.pm view on Meta::CPAN
level => int(rand(10)),
length => int(rand($_[0]->{max_length_of_stay})) || 1
);
}
sub say {
print $_[0] . "\n";
}
1;
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Builder.pm view on Meta::CPAN
if( $arg ) {
return $self->expected_tests($arg);
}
elsif( !defined $arg ) {
die "Got an undefined number of tests. Looks like you tried to ".
"say how many tests you plan to run but made a mistake.\n";
}
elsif( !$arg ) {
die "You said to run 0 tests! You've got to run something.\n";
}
}
view all matches for this distribution
view release on metacpan or search on metacpan
script/gen-generic-ind-company-names view on Meta::CPAN
#sub _add_unquoted {
# no warnings 'uninitialized';
#
# my ($word, $is_cur_word, $after_ws) = @_;
#
# #say "D:add_unquoted word=$word is_cur_word=$is_cur_word after_ws=$after_ws";
#
# $word =~ s!^(~)(\w*)(/|\z) | # 1) tilde 2) username 3) optional slash
# \\(.) | # 4) escaped char
# \$(\w+) # 5) variable name
# !
script/gen-generic-ind-company-names view on Meta::CPAN
# ((?: \\\\|\\"|\\'|\\=|\\\s|[^"'@><=|&\(:\s])+)(\s*) | # 8) unquoted word 9) space after
# ([\@><=|&\(:]+) | # 10) non-whitespace word-breaking characters
# \s+
# )!
# $pos += length($1);
# #say "D: \$1=<$1> \$2=<$3> \$3=<$3> \$4=<$4> \$5=<$5> \$6=<$6> \$7=<$7> \$8=<$8> \$9=<$9> \$10=<$10>";
# #say "D:<$1> pos=$pos, point=$point, cword=$cword, after_ws=$after_ws";
#
# if ($2 || $5 || defined($8)) {
# # double-quoted/single-quoted/unquoted chunk
#
# if (not(defined $cword)) {
# $pos_min_ws = $pos - length($2 ? $4 : $5 ? $7 : $9);
# #say "D:pos_min_ws=$pos_min_ws";
# if ($point <= $pos_min_ws) {
# $cword = @words - ($after_ws ? 0 : 1);
# } elsif ($point < $pos) {
# $cword = @words + 1 - ($after_ws ? 0 : 1);
# $add_blank = 1;
script/gen-generic-ind-company-names view on Meta::CPAN
# if ($after_ws) {
# $is_cur_word = defined($cword) && $cword==@words;
# } else {
# $is_cur_word = defined($cword) && $cword==@words-1;
# }
# #say "D:is_cur_word=$is_cur_word";
# $chunk =
# $2 ? _add_double_quoted($3, $is_cur_word) :
# $5 ? _add_single_quoted($6) :
# _add_unquoted($8, $is_cur_word, $after_ws);
# if ($opts && $opts->{truncate_current_word} &&
# $is_cur_word && $pos > $point) {
# $chunk = substr(
# $chunk, 0, length($chunk)-($pos_min_ws-$point));
# #say "D:truncating current word to <$chunk>";
# }
# if ($after_ws) {
# push @words, $chunk;
# } else {
# $words[-1] .= $chunk;
script/gen-generic-ind-company-names view on Meta::CPAN
#
# WORKAROUND_WITH_WORDBREAKS:
# # this is a workaround. since bash breaks words using characters in
# # $COMP_WORDBREAKS, which by default is "'@><=;|&(: this presents a problem
# # we often encounter: if we want to provide with a list of strings
# # containing say ':', most often Perl modules/packages, if user types e.g.
# # "Text::AN" and we provide completion ["Text::ANSI"] then bash will change
# # the word at cursor to become "Text::Text::ANSI" since it sees the current
# # word as "AN" and not "Text::AN". the workaround is to chop /^Text::/ from
# # completion answers. btw, we actually chop /^text::/i to handle
# # case-insensitive matching, although this does not have the ability to
script/gen-generic-ind-company-names view on Meta::CPAN
# next if $i==0 && $header_row;
# my $row = $data->[$i];
# for my $j (0..$#columns) {
# next unless defined $row->[$j];
# my $fmt_name = $fmt_names[$j];
# #say "D:j=$j fmt_name=$fmt_name";
# next unless $fmt_name;
# my $fmt_opts = $fmt_opts [$j];
# if ($fmt_name eq 'iso8601_datetime' || $fmt_name eq 'iso8601_date') {
# if ($row->[$j] =~ /\A[0-9]+(\.[0-9]*)?\z/) {
# my $frac = $1 ? "0$1"+0 : 0;
script/gen-generic-ind-company-names view on Meta::CPAN
#
#To check data against this schema (requires L<Data::Sah>):
#
# use Data::Sah qw(gen_validator);
# my $validator = gen_validator("rinci::function_meta*");
# say $validator->($data) ? "valid" : "INVALID!";
#
# # Data::Sah can also create validator that returns nice error message string
# # and/or coerced value. Data::Sah can even create validator that targets other
# # language, like JavaScript. All from the same schema. See its documentation
# # for more details.
view all matches for this distribution
view release on metacpan or search on metacpan
eg/example.pl view on Meta::CPAN
use strict;
use warnings;
use v5.16;
use Acme::IEnumerable;
say join ',',
Acme::IEnumerable
->range(1)
->take(10)
->reverse
->to_perl;
view all matches for this distribution
view release on metacpan or search on metacpan
builder/MyBuilder.pm view on Meta::CPAN
use Path::Tiny;
use Config;
sub ACTION_code ($self) {
unless ( defined $self->config_data('lib') ) {
say 'Building embedded C library...';
# Setup source directory
my $src_dir = path('_src');
$src_dir->mkpath;
builder/MyBuilder.pm view on Meta::CPAN
# But this isn't reality.
my $http = HTTP::Tiny->new;
for my $file (qw(stb_image.h stb_image_resize2.h stb_image_write.h)) {
my $path = $src_dir->child($file);
next if $path->exists;
say " Fetching $file...";
my $res = $http->get("https://raw.githubusercontent.com/nothings/stb/master/$file");
die "Failed to download $file" unless $res->{success};
$path->spew_raw( $res->{content} );
}
builder/MyBuilder.pm view on Meta::CPAN
#include "stb_image.h"
#include "stb_image_resize2.h"
#include "stb_image_write.h"
C
my $lib_file = $c->link;
say " Compiled: $lib_file";
$self->config_data( lib => $lib_file->basename );
}
# Run standard build steps (copying .pm files to blib/)
$self->SUPER::ACTION_code;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Insult/Evil.pm view on Meta::CPAN
Acme::Insult::Evil - Programmatically Generate Evil Insults
=head1 SYNOPSIS
use Acme::Insult::Evil qw[insult];
say insult( ); # stringify
=head1 DESCRIPTION
Acme::Insult::Evil provides 'evil' 'insulting' statements generated by the RESTful Evil Insult Generator API.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Insult/Glax.pm view on Meta::CPAN
Acme::Insult::Glax - Programmatically Generate Insults
=head1 SYNOPSIS
use Acme::Insult::Glax qw[insult];
say insult( );
=head1 DESCRIPTION
Acme::Insult::Glax provides 'insulting' statements generated by the RESTful libInsult API.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Insult/Pirate.pm view on Meta::CPAN
Acme::Insult::Pirate - Programmatically Generate Pirate Themed Insults
=head1 SYNOPSIS
use Acme::Insult::Pirate qw[insult];
say insult( ); # stringify
=head1 DESCRIPTION
Acme::Insult::Pirate provides pirate themed 'insulting' statements generated by the Pirate Monkeyness Pirate Insult
API.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Insult.pm view on Meta::CPAN
Acme::Insult - Code That Wasn't Raised Right
=head1 SYNOPSIS
use Acme::Insult qw[insult];
say insult;
=head1 DESCRIPTION
Acme::Insult is kind of a jerk.
view all matches for this distribution
view release on metacpan or search on metacpan
TEST_F = $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e test_f
TOUCH = $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e touch
UMASK_NULL = umask 0
DEV_NULL = > NUL
# The following is a portable way to say mkdir -p
# To see which directories are created, change the if 0 to if 1
MKPATH = $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e mkpath
# This helps us to minimize the effect of the .exists files A yet
# better solution would be to have a stable file in the perl
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Tie/Cycle.pm view on Meta::CPAN
use v5.10.1;
use Tie::Cycle;
tie my $cycle, 'Tie::Cycle', [ qw( FFFFFF 000000 FFFF00 ) ];
say $cycle; # FFFFFF
say $cycle; # 000000
say $cycle; # FFFF00
say $cycle; # FFFFFF back to the beginning
(tied $cycle)->reset; # back to the beginning
=head1 DESCRIPTION
view all matches for this distribution
view release on metacpan or search on metacpan
Well, this module is used just by use()ing it, so there's not much more
to say than what's already in the module documentation.
view all matches for this distribution
view release on metacpan or search on metacpan
Not that Buck reasoned it out. He was fit, that was all, and
unconsciously he accommodated himself to the new mode of life. All his
days, no matter what the odds, he had never run from a fight. But
the club of the man in the red sweater had beaten into him a more
fundamental and primitive code. Civilized, he could have died for a
moral consideration, say the defence of Judge Miller's riding-whip; but
the completeness of his decivilization was now evidenced by his ability
to flee from the defence of a moral consideration and so save his
hide. He did not steal for joy of it, but because of the clamor of his
stomach. He did not rob openly, but stole secretly and cunningly, out of
respect for club and fang. In short, the things he did were done because
Chapter IV. Who Has Won to Mastership
"Eh? Wot I say? I spik true w'en I say dat Buck two devils." This was
Francois's speech next morning when he discovered Spitz missing and Buck
covered with wounds. He drew him to the fire and by its light pointed
them out.
"Dat Spitz fight lak hell," said Perrault, as he surveyed the gaping
view all matches for this distribution
view release on metacpan or search on metacpan
examples/inslolt view on Meta::CPAN
sub prebuilt_insult {
my @insults = (
"English is your second language, isn't it? You don't have a first.",
"Just when I think, \"Surely this person has reached and encapsulates the limits of Internet tedium\" you go and push the boundary even further.",
"I refer to your latest discharge of plebeian verbiage; in which, you have proven, once again, that there is no such thing as unutterable nonsense.",
"Just when I think I've read the stupidest thing ever, you go and say something else",
"Thank you! We're all refreshed and challenged by your unique point of view, you ridiculous little carnival freak.",
"Is there a gibberish translator in the house? I can't make head nor nail of that uber-babble you flung onto the screen during your latest spasmodic seizure.",
"I see that you are fluent in Gibbering Moronese. Unfortunately, I'm not. You generate more waffle than the waffle making machine in a waffle factory.",
"Sorry. I don't speak retardese. Can you get someone to translate into meaningful English before you spew noise from your mouth, please?",
"Do you speak any language that non-gibbering idiots can understand?",
examples/inslolt view on Meta::CPAN
"I don't know what makes you such a worthless person, but it really works!",
"You would be out of your depth in a parking lot puddle.",
"I don't think you are a fool after reading what you say, but what's my opinion compared to that of thousands of others?",
"It seems your fingers not only did your typing, but did your thinking too. Have you considered suing your brain for non-support?",
"Are you normally this dumb or are you just having a blonde moment?",
"Trying to get something of value out of what you say is like trying to squeeze orange juice out of an apple.",
"I suppose I should have some sympathy for your handicap. You are obviously paralyzed from the neck up.",
"Thanks for your contribution, but if I had wanted to hear from somebody with your IQ, I'd be at my local supermarket talking to the vegetables.",
"Why don't you shrink your head and use it as a paperweight? It's not much use for writing anything intelligent with, that's for sure.",
"It's just as well you can type, for if you had to speak your mind, you'd be speechless.",
"Clearly, you have lost your fingertip grip on reality and have descended into an abyss of irreversible lunacy.",
view all matches for this distribution
view release on metacpan or search on metacpan
0.04 2020-03-12T17:06:57Z
- Localize $\
0.03 2020-03-12T12:21:05Z
- Fix say (issue reported by tobyink)
0.02 2020-03-12T10:22:33Z
- Generate README.md from pod
- Add picture to metacpan (not only github)
view all matches for this distribution
view release on metacpan or search on metacpan
example/curry.pl view on Meta::CPAN
use Time::localtime qw(localtime ctime);
use Acme::Lambda::Expr qw(:all);
my $f = curry(\&ctime, $x);
say '[1]', $f->(time);
say 'stringified = ', $f;
say 'deparsed = ', $f->deparse;
$f = curry('year', $x) + 1900;
say '[2]', $f->(scalar localtime);
say 'stringified = ', $f->stringify;
say 'deparsed = ', $f->deparse;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Lelek.pm view on Meta::CPAN
use feature 'say';
my $lek = Acme::Lelek->new;
my $encoded = $lek->encode("LOL");
say "encoded : $encoded";
say "original: " . $lek->decode($encoded);
=head1 Methods
=head2 encode
view all matches for this distribution