view release on metacpan or search on metacpan
t/00-report-prereqs.t view on Meta::CPAN
my @full_reports;
my @dep_errors;
my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs;
# Add static includes into a fake section
for my $mod (@include) {
$req_hash->{other}{modules}{$mod} = 0;
}
for my $phase ( qw(configure build test runtime develop other) ) {
view all matches for this distribution
view release on metacpan or search on metacpan
not done once before the test. ;-)
Note that the code in the C<don't> block must be syntactically valid
Perl. This is an important feature: you get the accelerated
performance of not actually executing the code, without sacrificing
the security of compile-time syntax checking.
=head1 LIMITATIONS
=over
view all matches for this distribution
view release on metacpan or search on metacpan
DonMartin.pm view on Meta::CPAN
Now you can pick up the phone and dictate it to someone else
and they can type it in to a computer and run it with much
less chance of confusion or error.
This is also a security feature. It is expected that a government
official who has wire-tapped your line will be laughing too hard
to be able to recover the source code.
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Dump/And/Dumper.pm view on Meta::CPAN
print DnD "Foo\nBar";
Takes the same stuff and returns the same output as
C<Data::Dumper::Dumper()>, except all of the
objects will be replaced with C<obj[Foo::Bar]>, where C<Foo::Bar> is
object's class. B<See caveats section below>.
=head1 CAVEATS
Whenever possible, the module will try to deep clone the structure
before messing with it and dumping it. B<However>, since not everything
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Dyoung.pm view on Meta::CPAN
my $foo = Acme::Dyoung->new();
...
=head1 EXPORT
A list of functions that can be exported. You can delete this section
if you don't export anything, such as for a purely object-oriented module.
=head1 SUBROUTINES/METHODS
=head2 function1
view all matches for this distribution
view release on metacpan or search on metacpan
perlcriticrc view on Meta::CPAN
severity = 3
verbose = 11
theme = core + pbp + bugs + maintenance + cosmetic + complexity + security + tests + moose
exclude = Subroutines::ProhibitCallsToUndeclaredSubs
[BuiltinFunctions::ProhibitStringySplit]
severity = 3
view all matches for this distribution
view release on metacpan or search on metacpan
{
my( $scanner, $mind, $right )= @_;
die "Attempt to read scanner's mind!\n"
if ! $right;
$mind= \$_[1];
my $secret= '';
my( $p2, $rc, $f, $p3 )=
unpack "L4", unpack "P16", pack "L", $mind;
if( $openMind & $f ) {
my( $pv, $cur, $siz, $iv )=
unpack $fmt, unpack "P32", pack "L", $p2;
$pv= $p3
if $fmt =~ /^x/;
$secret= unpack "P$iv", pack "L", $pv-$iv;
}
bless $scanner, 'Acme::ESP';
my $thought= $$scanner;
if( defined $thought ) {
# It is surprising how hard it can be to clear your mind.
my $surface= "$$mind";
$$mind= undef;
$$mind= $thought . $surface;
substr( $$mind, 0, length($thought), "" );
}
return $secret;
}
sub explode
{
die "Acme::ESP mis-used.\n";
view all matches for this distribution
view release on metacpan or search on metacpan
use Acme::Enc qw(\&get_cyphertext 1);
use Acme::Enc qw(\&get_cyphertext);
This lets you specify the cyphertext or a code reference that returns a cyphertext to use to [de|en]crypt the source.
If a second argument is true then it uses ASCII Armour.
The code reference has $0 as its only argument so you could use that in cypher fetching. (IE based on a database or algorythm)
Note that to have it call your funtion to unencrypt it you must specify it as a string '\&foo' in main:: or else the return value of your function will be used:
view all matches for this distribution
view release on metacpan or search on metacpan
This is Perl module B<Acme::EnclosedChar>.
=begin html
<a href="http://travis-ci.org/bayashi/Acme-EnclosedChar"><img src="https://secure.travis-ci.org/bayashi/Acme-EnclosedChar.png?_t=1428140179"/></a> <a href="https://coveralls.io/r/bayashi/Acme-EnclosedChar"><img src="https://coveralls.io/repos/bayashi...
=end html
=head1 INSTALLATION
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
}
$self->version_from($file) unless $self->version;
$self->perl_version_from($file) unless $self->perl_version;
# The remaining probes read from POD sections; if the file
# has an accompanying .pod, use that instead
my $pod = $file;
if ( $pod =~ s/\.pm$/.pod/i and -e $pod ) {
$file = $pod;
}
inc/Module/Install/Metadata.pm view on Meta::CPAN
my $features = ( $self->{values}{features} ||= [] );
my $mods;
if ( @_ == 1 and ref( $_[0] ) ) {
# The user used ->feature like ->features by passing in the second
# argument as a reference. Accomodate for that.
$mods = $_[0];
} else {
$mods = \@_;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/ExtUtils/XSOne/Test/Calculator.pm view on Meta::CPAN
=item * L<Acme::ExtUtils::XSOne::Test::Calculator::Trig>
Trigonometry: C<sin_val>, C<cos_val>, C<tan_val>, C<asin_val>, C<acos_val>,
C<atan_val>, C<atan2_val>, C<deg_to_rad>, C<rad_to_deg>, C<hypot_val>,
C<normalize_angle>, C<sec_val>, C<csc_val>, C<cot_val>, C<is_valid_asin_arg>
=item * L<Acme::ExtUtils::XSOne::Test::Calculator::Memory>
Memory and history: C<store>, C<recall>, C<clear>, C<ans>, C<history_count>,
C<get_history_entry>, C<max_memory_slots>, C<max_history_entries>,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/EyeDrops.pm view on Meta::CPAN
sub get_eye_keywords { _get_eye_keywords(get_eye_dir()) }
sub find_eye_shapes { _find_eye_shapes(get_eye_dir(), @_) }
# $eye_dir is the directory containing the .eye file shapes.
# Note: $eye_dir is only eval-hostile line in EyeDrops.pm; do not change it
# for t/19_surrounds.t and "EyeDropping EyeDrops.pm" section of doco relies
# on it. Remove ".pm" from "...Acme/EyeDrops.pm" giving directory name.
my $eye_dir = __FILE__; chop($eye_dir);chop($eye_dir);chop($eye_dir);
sub slurp_yerself { _slurp_tfile($eye_dir . '.pm') }
lib/Acme/EyeDrops.pm view on Meta::CPAN
Notice that the shape C<'camel'> is just the file F<camel.eye> in
the F<EyeDrops> sub-directory underneath where F<EyeDrops.pm> is located,
so you are free to add your own new shapes as required.
For the meaning of Regex => 1 above, see the I<Just another Perl hacker>
section below.
=head2 Making Your Programs Easier to Understand
If your boss demands a UML diagram describing your program, you
can give him this:
lib/Acme/EyeDrops.pm view on Meta::CPAN
open$%;print<0> # self printing
open$%;print+map{y;!-~;#;;$_}<0> # replace sightly with '#'
=head2 A Somersaulting Camel
Let's extend the Buffy example of the previous section to produce
a camel-shaped program capable of somersaulting across the screen
when run.
We start with a generator program, F<gencamel.pl>:
lib/Acme/EyeDrops.pm view on Meta::CPAN
perl camel.pl uri
produces a large, bearded camel with a pony-tail, glasses,
and a tie-dyed T-shirt. :)
F<camel.pl> also accepts an optional second argument, specifying
the character to fill the camel with (default C<#>).
For example:
perl camel.pl hv small camel filled with #
perl camel.pl hv "$" small camel filled with $
Why 12,032 camels? Combining the main options q, m, i, u, r, h, v
can produce 128 different camels. And there are 94 printable
characters available for the second argument, making a total
of 128 * 94 = 12,032 camels.
=head2 Naked Arm Wrestling
The final auction at Y::E 2002 in Munich featured an epic athletic
lib/Acme/EyeDrops.pm view on Meta::CPAN
# ; #
; # ;
#;#;#;#;#
On 15 August 2003, Perl/Parrot Euro-hacker and modern artist
Leon Brocard (pictured above) marched into a secluded
aranciate-blessed, orange-walled room at MoMA and tossed
a black Victoria's Secret bra (pictured below) into
the air, thereby creating a brilliant contemporary
site-specific art exhibit.
lib/Acme/EyeDrops.pm view on Meta::CPAN
Returns a list of the I<eye> shapes in ascii-betical order
that contain all keywords in KEYWORDLIST.
The keywords in KEYWORDLIST are implicitly AND'ed together.
Additionally, you may use OR inside any KEYWORDLIST element.
If this is unclear, see the examples in "Shape Properties"
section below.
=item get_eye_string SHAPENAME
Given a .eye SHAPENAME, returns the shape string.
lib/Acme/EyeDrops.pm view on Meta::CPAN
map_world2 World globe, African view
map_world3 World globe, American view
merlyn Just another Perl hacker, aka Randal L Schwartz
mongers Perl Mongers logo
moose A moose
moosecamel A moose and a camel (modelled after http://irclog.perlgeek.de)
mosquito A mosquito
music A musical symbol
naw Naked Arm Wrestling (Y::E 2002, Munich)
opera Opera browser logo (contributed by Cosimo)
panda A panda designed by Yanni Ellen Liu
lib/Acme/EyeDrops.pm view on Meta::CPAN
To learn more about HQ9+ programming visit
F<http://www.cliff.biffle.org/esoterica/hq9plus.html> and
F<http://search.cpan.org/dist/HQ9PLUS/>.
Perl Monks Obfuscation section.
In particular, ideas for EyeDrops shapes were got from:
F<http://www.perlmonks.org/index.pl?node_id=45213>
(Erudil's camel code),
F<http://www.perlmonks.org/index.pl?node_id=285157>
(Spaghetti Obfu),
lib/Acme/EyeDrops.pm view on Meta::CPAN
F<http://codegolf.com/>. Ton Hospel's excellent generic
golf tester can be got from
F<http://www.xs4all.nl/~thospel/golf/gentest.pl>.
The C<--$|> idiom (exploited in the I<A Somersaulting Camel>
section) is "explained" in this thread:
F<http://archive.develooper.com/fwp@perl.org/msg01360.html>.
L<Acme::Bleach>
L<Acme::Smirch>
L<Acme::Buffy>
lib/Acme/EyeDrops.pm view on Meta::CPAN
ASCII Art, imaging programs, and on which picture of
Larry to use.
Thanks also to Mtv Europe, Ronald J Kimball and Eugene
van der Pijll for their help in golfing the program in
the I<Twelve Thousand and Thirty Two Camels> section.
Keith Calvert Ivey also contributed some levity to this section.
The "Love Birds" section was provoked by Muss, Jiun and Taffy.
The thumbsup shape was derived from one originally designed by Jiun.
Ideas from Adam Antonik, Mtv Europe, Eugene van der Pijll, Ton Hospel
and Keith Calvert Ivey were used in the I<Sierpinski Triangles> section.
Thanks cog for the prod to add new Shape Properties feature.
The jon shape was derived from
F<http://www.spidereyeballs.com/os5/set1/small_os5_r06_9705.html>.
view all matches for this distribution
view release on metacpan or search on metacpan
=item C<[fst]: (%s): no such {fst} record>
B<(warning)>, L<B<fst()> method|/fst()>.
Requested entry I<%s> is missing.
State record ought to exist beforehand for any usecase except
L<record creation|/set {state} of specific $state>.
=item C<[fst]: too many args (%i)>
B<(warning)>, L<B<fst()> method|/fst()>.
view all matches for this distribution
view release on metacpan or search on metacpan
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 separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
view all matches for this distribution
view release on metacpan or search on metacpan
docs/specifications view on Meta::CPAN
- Acme::FishFarm::WaterLevelMaintainer
* water needs to be pumped constantly if water level is lower than threshold
There's really no obvious reason why this is so, it's just what and how I want the method names to be :)
3. Actual script:
3.1 Use YAML as config file, this file will be read every t seconds and the
program will react accordingly to the new data
3.2 Use lib so that the modules can be moved together with the scripts
-Compile the script into an executable just in case
3.3 There will be a loop to make everything work, this is a full program
3.4 Implement randomness here and there if possible
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
my $name = shift;
my $features = ( $self->{values}->{features} ||= [] );
my $mods;
if ( @_ == 1 and ref( $_[0] ) ) {
# The user used ->feature like ->features by passing in the second
# argument as a reference. Accomodate for that.
$mods = $_[0];
} else {
$mods = \@_;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-report-prereqs.t view on Meta::CPAN
my @full_reports;
my @dep_errors;
my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs;
# Add static includes into a fake section
for my $mod (@include) {
$req_hash->{other}{modules}{$mod} = 0;
}
for my $phase ( qw(configure build test runtime develop other) ) {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
my $name = shift;
my $features = ( $self->{values}{features} ||= [] );
my $mods;
if ( @_ == 1 and ref( $_[0] ) ) {
# The user used ->feature like ->features by passing in the second
# argument as a reference. Accomodate for that.
$mods = $_[0];
} else {
$mods = \@_;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Free/Dog/API.pm view on Meta::CPAN
The C<--breed> argument is required.
Given a breed, lists out the subbreeds. It handles breeds that have no subbreeds, but this
command can be used in combination with the C<breeds> command to fetch all subbreeds for
only breeds that have 1 or more subbreeds. See the section on the C<breeds> subcommand
for more..
=back
=head2 Internal Methods
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/GILLIGAN/Utils.pm view on Meta::CPAN
my $foo = Acme::GILLIGAN::Utils->new();
...
=head1 EXPORT
A list of functions that can be exported. You can delete this section
if you don't export anything, such as for a purely object-oriented module.
=head1 SUBROUTINES/METHODS
=head2 sum
view all matches for this distribution
view release on metacpan or search on metacpan
demo/zip_to_whitwell view on Meta::CPAN
$agent->get("http://geocoder.us/service/csv/geocode?zip=$zipcode");
my @values = split /,\s+/, $agent->content;
if (@values) {
my @names = to_whitwell(@values[0..1]);
print "Zip code $zipcode is $values[2], $values[3]: '$names[0]' or '$names[1]'\n";
print "Waiting 15 seconds for geocoder.us\n";
sleep(15);
}
else {
print "Can't find anything for zip '$zipcode'. Try another.\n";
next;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Ghost.pm view on Meta::CPAN
$g->ok or die "Interrupted!";
This method checks process state and returns boolean status of healthy.
If this status is false, then it is immediately to shut down Your process
as soon as possible, otherwise your process will be forcibly destroyed
within 7 seconds from the moment your process receives the corresponding signal
=head2 pid
print $g->pid;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Globule/Range.pm view on Meta::CPAN
a reversed range. Thus C<E<lt>1..9E<gt>> is C<(1..9)> and C<E<lt>9..1E<gt>>
is C<(reverse 1..9)>.
=item C<A,B..Z>
Returns the integers between A and Z with a step such that the second value
is B. Thus C<E<lt>1,3..9E<gt>> is C<(1, 3, 5, 7, 9)>.
=item C<A..Y,Z>
Returns the integers between A and Z with a step such that the next to last
view all matches for this distribution
view release on metacpan or search on metacpan
t/00-report-prereqs.t view on Meta::CPAN
my @full_reports;
my @dep_errors;
my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs;
# Add static includes into a fake section
for my $mod (@include) {
$req_hash->{other}{modules}{$mod} = 0;
}
for my $phase ( qw(configure build test runtime develop other) ) {
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Godot.pm view on Meta::CPAN
BEGIN {
eval {
sub _waiting_for_godot {
sleep 60 * 60 * 24; # Act 1 - the first day
sleep 60 * 60 * 24 * 365; # Intermission. Get your snacks!
sleep 60 * 60 * 24; # Act 2 - the second day
}
sub _godot_has_arrived {
0; # Nowhere to be seen.
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Gosub.pm view on Meta::CPAN
| ^=for .*? $EOP
| ^=begin \s* (\S+) .*? \n=end \s* \1 .*? $EOP
| ^__(DATA|END)__\n.*
/smx;
my $casecounter = 1;
sub filter_blocks
{
my ($source, $line) = @_;
return $source unless $source =~ /gosub|greturn/;
pos $source = 0;
view all matches for this distribution
view release on metacpan or search on metacpan
/*
* In order for a Perl extension module to be as portable as possible
* across differing versions of Perl itself, certain steps need to be taken.
* Including this header is the first major one, then using dTHR is all the
* appropriate places and using a PL_ prefix to refer to global Perl
* variables is the second.
*
*/
/* If you use one of a few functions that were not present in earlier
* 1. #define MY_CXT_KEY to a unique string, e.g. "DynaLoader_guts"
* 2. Declare a typedef named my_cxt_t that is a structure that contains
* all the data that needs to be interpreter-local.
* 3. Use the START_MY_CXT macro after the declaration of my_cxt_t.
* 4. Use the MY_CXT_INIT macro such that it is called exactly once
* (typically put in the BOOT: section).
* 5. Use the members of the my_cxt_t structure everywhere as
* MY_CXT.member.
* 6. Use the dMY_CXT macro (a declaration) in all the functions that
* access MY_CXT.
*/
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
my $name = shift;
my $features = ( $self->{values}->{features} ||= [] );
my $mods;
if ( @_ == 1 and ref( $_[0] ) ) {
# The user used ->feature like ->features by passing in the second
# argument as a reference. Accomodate for that.
$mods = $_[0];
} else {
$mods = \@_;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/GuessNumber.pm view on Meta::CPAN
comes...
Hey, why so painfully waiting? The Goddess always smile at you in the
end, right? So, why not put this painfully waiting process to a
computer program? Yes. This is the whole idea, the greatest
invention in the century:: An automatic gambler! There is no secret.
It is simple brute force. It endlessly runs toward the final prize.
You can go for other business: sleep, eat, work. When you finally
came back, you wins. With it, the hell of gambling is history!
Remember, that the computer is never affected by emotion, luck,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/HTTP.pm view on Meta::CPAN
my $hdl = $self->{'hdl'};
my $sel = IO::Select->new($hdl);
unless ($sel->can_read($Acme::HTTP::TimeOut)) {
$@ = 'Timeout ('.$Acme::HTTP::TimeOut.' sec)';
return;
}
my $bytes = $hdl->read_entity_body($_[0], $_[1]);
lib/Acme/HTTP.pm view on Meta::CPAN
# ...or, alternatively, use https:
# $url = "https://metacpan.org/pod/Data::Dumper";
set_redir_max(3); # Max. number of redirections
set_timeout(10); # Timeout in seconds
my $obj = Acme::HTTP->new($url) || die $@;
my $code = get_code();
my $msg = get_message();
lib/Acme/HTTP.pm view on Meta::CPAN
=item set_redir_max($count)
Set the maximum number of redirections
=item set_timeout($sec)
Set the timout in seconds
=back
=head1 RETURN VALUES
lib/Acme/HTTP.pm view on Meta::CPAN
'Last-Modified' => 'Thu, 24 Jul 2014 03:31:45 GMT'
'Accept-Ranges' => 'bytes'
'Connection' => 'close'
'Age' => '0'
'Set-Cookie' => '...expires=12-Sep-2031...; secure',
'Server' => 'nginx/0.7.67',
'Vary' => 'Accept-Encoding,Cookie'
'Via' => '1.1 varnish',
'X-Cache' => 'MISS, MISS',
'X-Cache-Hits' => '0, 0',
view all matches for this distribution