view release on metacpan or search on metacpan
lib/Acme/Lexical/Thief.pm view on Meta::CPAN
greet_verbally();
}
sub greet_verbally {
steal $name; # caller variable
say "Hello $name";
}
=head1 DESCRIPTION
This package allows you access to your caller's lexical variables, without
lib/Acme/Lexical/Thief.pm view on Meta::CPAN
variables.
sub greet_verbally {
my $name; # don't do this!
steal $name;
say "Hello $name";
}
By default, this module steals from your I<immediate> caller. You can
thieve higher up the call stack using:
lib/Acme/Lexical/Thief.pm view on Meta::CPAN
=head1 WHY YOU SHOULD NOT USE THIS MODULE
When people declare lexical (C<my>) variables within a sub, they (quite
reasonably) expect these to stay local to the sub. If they rename those
variables, change them (say replacing a hashref with a hash), drop them
or whatever, then they don't expect code outside the sub to pay much
attention.
Peeking at your caller's lexicals breaks those expectations.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Lingua/ZH/Remix.pm view on Meta::CPAN
use Acme::Lingua::ZH::Remix;
my $x = Acme::Lingua::ZH::Remix->new;
# Generate a random sentance
say $x->random_sentence;
=head1 DESCRIPTION
Because lipsum is not funny enough, that is the reason to write this
module.
lib/Acme/Lingua/ZH/Remix.pm view on Meta::CPAN
my $x = Acme::Lingua::ZH::Remix->new;
$x->feed($my_corpus);
# Say something based on $my_corpus
say $x->random_santence;
The corpus should use full-width punctuation characters.
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Locals.pm view on Meta::CPAN
use English qw(-no_match_vars);
my $find_best_say = sub {
eval q{use Perl6::Say}; ## no critic
return if not $EVAL_ERROR;
no warnings 'once'; ## no critic
*say = sub { print @_, "\n" };
};
$find_best_say->();
}
my $DEFAULT_FORMAT = q{%s};
lib/Acme/Locals.pm view on Meta::CPAN
return;
}
sub sayx ($@){ ## no critic
say sprintx([caller 0], @_);
}
sub printx ($@) { ## no critic
print sprintx([caller 0], @_);
}
view all matches for this distribution
view release on metacpan or search on metacpan
author/ja2kana.pl view on Meta::CPAN
my ($en, $kana) = split ',';
$en2kana{lc $en} = $kana;
}
my %skip_word = map { $_ => 1 } qw(
now say new be come see is as
one two three four five
six seven eight nine ten
law raw row whole weigh
hurt hut firm fare flesh
youth lack role waste worth
view all matches for this distribution
view release on metacpan or search on metacpan
include/GL/freeglut_ext.h view on Meta::CPAN
#define GLUT_ACTION_ON_WINDOW_CLOSE 0x01F9
#define GLUT_WINDOW_BORDER_WIDTH 0x01FA
#define GLUT_WINDOW_BORDER_HEIGHT 0x01FB
#define GLUT_WINDOW_HEADER_HEIGHT 0x01FB /* Docs say it should always have been GLUT_WINDOW_BORDER_HEIGHT, keep this for backward compatibility */
#define GLUT_VERSION 0x01FC
#define GLUT_RENDERING_CONTEXT 0x01FD
#define GLUT_DIRECT_RENDERING 0x01FE
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/MJD.pm view on Meta::CPAN
=cut
__DATA__
#11900 You cannot just paste code with no understanding of what is going on and expect it to work.
#11901 You can't just make shit up and expect the computer to know what you mean, Retardo!
#11902 You said it didn't work, but you didn't say what it would have done if it *had* worked.
#11903 What are you really trying to accomplish here?
#11904 Who the fuck cares which one is faster?
#11905 Now is the time in our program where you look at the manual.
#11906 Look at the error message! Look at the error message!
#11907 Looking for a compiler bug is the strategy of LAST resort. LAST resort.
lib/Acme/MJD.pm view on Meta::CPAN
#11939 Because the computer cannot read your mind. Guess what? I cannot read your mind *either*.
#11940 You said `It doesn't work'. The next violation will be punished by death.
#11941 Of course it doesn't work! That's because you don't know what you are doing!
#11942 Sure, but you have to have some understanding also.
#11943 Ah yes, and you are the first person to have noticed this bug since 1987. Sure.
#11944 Yes, that's what it's supposed to do when you say that.
#11945 Well, what did you expect?
#11946 Perhaps you have forgotten that this is an engineering discipline, not some sort of black magic.
#11947 You know, this sort of thing is amenable to experimental observation.
#11948 Perhaps your veeblefitzer is clogged.
#11949 What happens when you try?
lib/Acme/MJD.pm view on Meta::CPAN
#11957 Show the code.
#11958 The bug is in you, not in Perl.
#11959 Cargo-cult.
#11960 So you threw in some random punctuation for no particular reason, and then you didn't get the result you expected. Hmmmm.
#11961 How should I know what is wrong when I haven't even seen the code? I am not clairvoyant.
#11962 How should I know how to do what you want when you didn't say what you wanted to do?
#11963 It's easy to get the *wrong* answer in O(1) time.
#11964 I guess this just goes to show that you can lead a horse to water, but you can't make him drink it.
#11999 You are a stupid asshole. Shut the fuck up.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/MUDLike.pm view on Meta::CPAN
sub _eval {
my $self = shift;
my $cmd = join ' ', @_;
no warnings 'redefine';
# *print = sub { $self->tell_object(@_); }; # this doesn't work reliablely due to possible context changes but worth a shot
# *say = sub { $self->tell_object("@_\n"); }; # ack... doesn't work at all.
select $self->request->{request}->{conn}; # would rather it went into their message buffer but comprimising for now
my $res = eval($cmd) || "Error: ``$@''.";
$self->tell_object("eval:\n$res");
}
lib/Acme/MUDLike.pm view on Meta::CPAN
if ( jQuery._$ )
$ = jQuery._$;
return jQuery;
},
// This may seem like some crazy code, but trust me when I say that this
// is the only cross-browser way to do this. --John
isFunction: function( fn ) {
return !!fn && typeof fn != "string" && !fn.nodeName &&
typeof fn[0] == "undefined" && /function/i.test( fn + "" );
},
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/MadokaMagica/TvMembers.pm view on Meta::CPAN
}
$self->has_qb(1);
}
sub say {
my ($self) = @_;
my $line = (caller)[2];
my $limit = $self->{startline} +100;
if( $line >= $limit ) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Magic/Pony.pm view on Meta::CPAN
=head1 INSPIRATION
Michael G Schwern said:
As long as we're talking platitudes, why don't we just say you never have to
upgrade! In fact, you never even have to install the software, magic ponies
inside your computer will just know when you need it and go get it for you. [1]
Also everyone gets a million dollars and a pet dragon.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Magic8Ball.pm view on Meta::CPAN
__DATA__
Signs point to yes.
Yes.
Reply hazy, try again.
Without a doubt.
My sources say no.
As I see it, yes.
You may rely on it.
Concentrate and ask again.
Outlook not so good.
It is decidedly so.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Marvel/CinematicUniverse/Characters.pm view on Meta::CPAN
=head1 SYNOPSIS
use Acme::Marvel::CinematicUniverse::Characters;
say for Acme::Marvel::CinematicUniverse::Characters->find('tony');
=head1 DESCRIPTION
This module is primarily intended as an example of how to distribute instances
of objects on CPAN.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Math/Google.pm view on Meta::CPAN
print $amg->calc('e**(i*pi)', 1); # 'e ** (i * pi) = -1'
# WWW::Google::Calculator compat
=head1 DESCRIPTION
Need I say more than above?
=head2 EXPORT
None.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/MathProfessor/RandomPrime.pm view on Meta::CPAN
=head1 SYNOPSIS
use Acme::MathProfessor::RandomPrime;
say 'Let $N be a random prime'; $N = random_prime;
=head1 DESCRIPTION
Math professors often pick a random prime to work out an example.
This module mimics the algorithm the typical math professor uses.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/MetaSyntactic/willy_wonka.pm view on Meta::CPAN
L<< http://www.roalddahl.com/ >>.
=head1 NOTES
If you are only familiar with the movies, the name Arthur Slugworth may
not say you much; but he plays a more prominent role in the book.
=head1 AUTHOR
Abigail, L<< mailto:cpan@abigail.be >>.
view all matches for this distribution
view release on metacpan or search on metacpan
t/author/perlcriticrc view on Meta::CPAN
# Need to write CodeLayout::RequireUTF8
[-CodeLayout::RequireASCII]
# Perl::Tidy wouldn't know a properly formatted conditional expression
# if one stomped all over Perl::Tidy.pm. (Not to say that P::T isn't
# useful.)
[-CodeLayout::RequireTidyCode]
[Documentation::RequirePodSections]
lib_sections = NAME | VERSION | DESCRIPTION | DIAGNOSTICS | CONFIGURATION AND ENVIRONMENT | DEPENDENCIES | INCOMPATIBILITIES | BUGS AND LIMITATIONS | AUTHOR | LICENSE AND COPYRIGHT | DISCLAIMER OF WARRANTY
view all matches for this distribution
view release on metacpan or search on metacpan
t/author/perlcriticrc view on Meta::CPAN
# Need to write CodeLayout::RequireUTF8
[-CodeLayout::RequireASCII]
# Perl::Tidy wouldn't know a properly formatted conditional expression
# if one stomped all over Perl::Tidy.pm. (Not to say that P::T isn't
# useful.)
[-CodeLayout::RequireTidyCode]
[Documentation::RequirePodSections]
lib_sections = NAME | VERSION | DESCRIPTION | DIAGNOSTICS | CONFIGURATION AND ENVIRONMENT | DEPENDENCIES | INCOMPATIBILITIES | BUGS AND LIMITATIONS | DEDICATION | AUTHOR | LICENSE AND COPYRIGHT | DISCLAIMER OF WARRANTY
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/MetaSyntactic.pm view on Meta::CPAN
my $foo = "bar";
$foo .= "baz"; # barbaz
But one gets quickly stuck with the same old boring examples.
Does it have to be this way? I say "No".
Here is C<Acme::MetaSyntactic>, designed to fulfill your metasyntactic needs.
Never again will you scratch your head in search of a good variable name!
=head1 METHODS (& FUNCTIONS)
view all matches for this distribution
view release on metacpan or search on metacpan
use utf8;
use Acme::MilkyHolmes;
my ($sherlock, $nero, $elly, $cordelia) = Acme::MilkyHolmes->members();
$sherlock->say('ã£ã¦ãªãã§ã§ããã¼');
$nero->say('åã®ãã¾ãã¾æ£ã');
$elly->say('æ¥ãããã...');
$cordelia->say('ç§ã®...ãè±ç...');
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/MomoiroClover/Members/Base.pm view on Meta::CPAN
$self->_initialize;
return $self;
}
sub say {
my ($self, $comment) = @_;
print $ansi_colors->{$self->color} if ($self->color);
print $self->nick->[0] || $self->name_ja;
print ': ';
print $comment, "\x1b[0m\n";
lib/Acme/MomoiroClover/Members/Base.pm view on Meta::CPAN
my $emoticon = $member->emoticon; # arrayref
my $graduate_date = $member->graduate_date; # Date::Simple object
my $join_date = $member->join_date; # Date::Simple object
my $color = $member->color;
$member->say('momoclo chan!!');
}
=head1 DESCRIPTION
Acme::MomoiroClover::::Member::Base is a baseclass of the class represents each
member of Momoiro Clover.
=head1 METHODS
=head2 say ( $comment )
$member->say("momoclo chan!!");
=back
=head1 ACCESSORS
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/MyFirstModule/MALLEN.pm view on Meta::CPAN
}
sub ping {
my $self = shift;
say "You have to use perl 5.20 to run this.";
1;
}
'beer';
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Builder.pm view on Meta::CPAN
sub _is_qr {
my $regex = shift;
# is_regexp() checks for regexes in a robust manner, say if they're
# blessed.
return re::is_regexp($regex) if defined &re::is_regexp;
return ref $regex eq 'Regexp';
}
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;
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
OneHundredNotOut.pm view on Meta::CPAN
"lights" into the air in a wonderfully scifi way, but I could shout
"mail" and have a summary of my inbox read to me, "news" to get the
latest BBC news headlines, and "time" to hear the time. Of course,
getting computers to tell the time nicely takes a little bit of work. I
don't like "It's eleven oh-three pee em", since that's not what someone
would say if you asked them the time. I wanted my robot to say "It's
just after eleven", and that's what L<Time::Human> does. Shame about the
localisation.
=head2 Messing About With Classes
OneHundredNotOut.pm view on Meta::CPAN
usually, for the programmer using my modules) and then a bit simpler.
So, for instance, I found the whole process of keeping values persistent
between runs of Perl a bit of a nightmare - I could never remember the
syntax for tying to C<DB_File>, and I would always forget to use the
extremely handy C<MLDBM> module. I just wanted to say "keep this
variable around". L<Attribute::Persistent> does just that, cleanly and
simply. It even works out a sensible place to put the database, so you
don't have to.
Similarly, L<Config::Auto> works out where your application might keep a
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Onion.pm view on Meta::CPAN
⯠cat examples/lib/Hello.ð§
package Hello;
sub onion { 'Hello ð§
' }
1;
⯠perl -Iexamples/lib -MAcme::Onion -MHello -E 'say Hello->onion';
Hello ð§
=head1 DESCRIPTION
Acme::Onion is a Perl module designed to enable the use of .ð§
file extension alongside traditional .pm files. It provides a simple, yet unique way to organize and manage your Perl code.
view all matches for this distribution
view release on metacpan or search on metacpan
eg/mac_speak view on Meta::CPAN
use strict;
use Acme::Opish;
print enop("@ARGV"), "\n";
s/'//g for @ARGV;
my @opped = enop(-opish_prefix => 'awp', @ARGV);
system qq/echo 'tell application "Finder" to say "@opped"' | osascript/;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/PPIx/MetaSyntactic.pm view on Meta::CPAN
return join " ", @_;
}
my @greetings = qw(Hello);
say join_spaces($greetings[0], PLACE);
END
say $acme->document;
Example output:
use v5.010;
use constant VULTURE => "World";
lib/Acme/PPIx/MetaSyntactic.pm view on Meta::CPAN
return join " ", @_;
}
my @gang_of_thieves = qw(Hello);
say fraud($gang_of_thieves[0], VULTURE);
=head1 DESCRIPTION
This module uses L<PPI> to parse some Perl source code, find all the
variables and function names defined in it, and reassign them random names
view all matches for this distribution
view release on metacpan or search on metacpan
builder/Acme/Parataxis/Builder.pm view on Meta::CPAN
( my $pm = $pl_file ) =~ s/\.PL$//;
system $^X, $pl_file->stringify, $pm and die "$pl_file returned $?\n";
}
# C Extension Compilation - removed conditional block
say 'Building libparataxis...';
require Affix::Build; # This module is used for C compilation
require Config;
require File::Spec;
my $arch_dir = catdir(qw[blib arch auto Acme Parataxis]);
mkpath( $arch_dir, $verbose );
builder/Acme/Parataxis/Builder.pm view on Meta::CPAN
clean => 0
);
# Add the C source file to be compiled. It's expected to be in 'lib/Acme/'
$build->add('lib/Acme/Parataxis.c');
say "Compiling and linking...";
$build->compile_and_link();
say "Build complete.";
my %modules = map { $_ => catfile( 'blib', $_ ) } find( qr/\.pm$/, 'lib' );
my %docs = map { $_ => catfile( 'blib', $_ ) } find( qr/\.pod$/, 'lib' );
my %scripts = map { $_ => catfile( 'blib', $_ ) } find( qr/(?:)/, 'script' );
my %sdocs = map { $_ => delete $scripts{$_} } grep {/.pod$/} keys %scripts;
pm_to_blib( { %modules, %docs, %sdocs }, catdir(qw[blib lib auto]) );
builder/Acme/Parataxis/Builder.pm view on Meta::CPAN
$method // die "No such action '$action'\n";
exit $method->($self);
}
method Build_PL() {
say sprintf 'Creating new Build script for %s %s', $meta->name, $meta->version;
$self->write_file( 'Build', sprintf <<'', $^X, __PACKAGE__, __PACKAGE__ );
#!%s
use lib 'builder';
use %s;
use Getopt::Long qw[GetOptionsFromArray];
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Partitioner.pm view on Meta::CPAN
join " ", map { $p->partition_of($_) }
$dfa->transitions_from($_)
});
while ($partitioning->refine) {
say "Still partitioning, got "
. $p->size . " partitions so far";
}
=head1 DESCRIPTION
view all matches for this distribution
view release on metacpan or search on metacpan
benchmark/pinoko_vs_geso.pl view on Meta::CPAN
})
);
sub kytea_pinoko
{
my $result = $kytea_pinoko->say($text);
}
sub mecab_pinoko
{
my $result = $mecab_pinoko->say($text);
}
=begin
sub geso
{
view all matches for this distribution
view release on metacpan or search on metacpan
Playwright.pm view on Meta::CPAN
@nS = ( 'Menelaus', 'Paulo', 'Ivano', 'Junior', 'Jughead', 'Jared', 'Jimmy', 'Perry', 'Taliesin', 'Devon' );
@nT = ( 'Red', 'Bonzo', 'Sparky', 'Tex', 'Surachai', 'Samaransak', 'Nai', 'Jackie', 'Bruce', 'Lennox' );
%Phrases = (
'That was funny!' => 'A', 'How long have you been here?' => 'B',
'How long have you been waiting?' => 'C', 'When did you say you had your appointment?' => 'D',
'That is a lovely shade of blue.' => 'E', 'That weighs a bit more than I expected.' => 'F',
'Where did you say you want me to put that?' => 'G', "I won't put that there." => 'H',
"Are you sure I'm supposed to put that there?" => 'I', 'I need to sharpen my sword.' => 'J',
'I like to paint.' => 'K', 'Wow, you have a lot of books.' => 'L',
'I finally got my network setup.' => 'M', 'I need more RAM.' => 'N',
'Where did I put my pen?' => 'O', 'That looks like a nasty cut.' => 'P',
'Have you got some aspirin?' => 'Q', 'Got any gum?' => 'R',
Playwright.pm view on Meta::CPAN
'He never stops complaining!' => '_', "Sure, just wait until he isn't looking." => '+',
'Why does that smell like cheese?' => '[', "I'm not sure I've ever seen anything that ugly." => '{',
'How may of those do you have?' => ']', 'Lots more than you do.' => '}',
'I would love to.' => '\\','I can think of nothing I would like better.' => '|',
'No, it is too soon for that.' => ';', 'She thinks I dance funny.' => ':',
'Nice socks. Did you get dressed in the dark?' => "'", 'Why must you say things like that?' => '"',
'Because I think it is funny.' => ',', 'Hey, you asked.' => '<',
"That's the last time I ask for your opinion." => '.', 'I never did care for that.' => '>',
"That's what you think." => '/', 'Wonderful, my nose is bleeding again.' => '?',
'Why would I do that?' => ' ', 'I need more paint.' => ' ',
'The water is warm.' => ' ', 'Have you ever seen so many worms?' => ' ',
view all matches for this distribution