view release on metacpan or search on metacpan
inc/Test/Builder.pm view on Meta::CPAN
}
sub _autoflush {
my($fh) = shift;
my $old_fh = select $fh;
$| = 1;
select $old_fh;
}
sub _dup_stdhandles {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/DeepThoughts.pm view on Meta::CPAN
If I ever become a mummy, I'm going to have it so when somebody opens my lid, a boxing glove on a spring shoots out.
Broken promises don't upset me. I just think, why did they believe me?
What is it about a beautiful sunny afternoon, with the birds singing and the wind rustling through the leaves, that makes you want to get drunk? And after you're real drunk, maybe go down to the public park and stagger around and ask people for money...
If you ever go temporarily insane, don't shoot somebody, like a lot of people do. Instead, try to get some weeding done, because you'd really be surprised.
It's really sad when a family can be torn apart by something as simple as wild dogs.
Sometimes you have to be careful when selecting a new nickname for yourself. For instance, let's say you have chosen the nickname "Fly Head." Normally, you would think that "Fly Head" would mean a person who had beautiful swept-back features, as if ...
I think college administrators should encourage students to urinate on walls and bushes, because then when students from another college come sniffing around, they'll know this is someone else's territory.
I think somebody should come up with a way to breed a very large shrimp. That way, you could ride him, then after you camped at night, you could eat him. How about it, science?
If your friend is already dead, and being eaten by vultures, I think it's okay to feed some bits of your friend to one of the vultures, to teach him to do some tricks. But ONLY if you're serious about adopting the vulture.
At first I thought, if I were Superman, a perfect secret identity would be "Clark Kent, Dentist," because you could save money on tooth X-rays. But then I thought, if a patient said, "How's my back tooth?" and you just looked at it with your X-ray vi...
Marta says the interesting thing about fly-fishing is that it's two lives connected by a thin strand. Come on, Marta. Grow up.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/DependOnEverything.pm view on Meta::CPAN
use Lexical::Hints;
use Lexical::Import;
use Lexical::Importer;
use Lexical::Persistence;
use Lexical::SealRequireHints;
use Lexical::select;
use Lexical::SingleAssignment;
use Lexical::Types;
use Lexical::TypeTiny;
use Lexical::Util;
use Lexical::Var;
lib/Acme/DependOnEverything.pm view on Meta::CPAN
use Positron::v;
use POSIX::AtFork;
use POSIX::bsearch;
use POSIX::getpeername;
use POSIX::Open;
use POSIX::pselect;
use POSIX::Regex;
use POSIX::RT::MQ;
use POSIX::RT::Scheduler;
use POSIX::RT::Semaphore;
use POSIX::RT::SharedMem;
view all matches for this distribution
view release on metacpan or search on metacpan
tidyall.ini view on Meta::CPAN
; Install Code::TidyAll
; run "tidyall -a" to tidy all files
; run "tidyall -g" to tidy only files modified from git
[PerlTidy]
select = {lib,t}/**/*.{pl,pm,t}
view all matches for this distribution
view release on metacpan or search on metacpan
tidyall.ini view on Meta::CPAN
[PerlTidy]
select = **/*.{pl,pm,t,psgi}
ignore = t/00-*
ignore = t/author-*
ignore = t/release-*
ignore = blib/**/*
ignore = .build/**/*
ignore = Acme-Dzil-Plugin-Tester-*/**/*
argv = --profile=$ROOT/perltidyrc
[PerlCritic]
select = **/*.{pl,pm,t,psgi}
ignore = t/00-*
ignore = t/author-*
ignore = t/release-*
ignore = blib/**/*
ignore = .build/**/*
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/EyeDrops.pm view on Meta::CPAN
Software Art page at F<http://www.runme.org/>.
Acme's Y::E 2002 naked arm wrestling movie at
F<http://astray.com/tmp/yapcbits3.mov>.
Japanese translations of selected CPAN modules (including Acme::EyeDrops)
can be found at F<http://perldoc.jp/docs/modules/>.
(Japanized Perl Resources Project is at
F<https://sourceforge.jp/projects/perldocjp/>).
Perl Obfuscation Engines, for example, yaoe by Perl Monk mtve,
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Free/API/ChuckNorris.pm view on Meta::CPAN
Makes the SaaS API call to get the list of categories. It accepts no arguments.
=item C<< random([category => STRING]) >>
Returns a random quote. Accepts a single optional parameter that will select the
random quote from a specific category.
=item C<< search( terms => STRING ) >>
Requires a single named parameter to specify the search terms. The resulting quotes
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Free/Public/APIs.pm view on Meta::CPAN
printf $out, $api->id, ($api->emoji) ? sprintf("(%s) ",$api->emoji) : "",, $api->title, $api->source, $api->methods, $api->health, $api->documentation, $api->source;
=head2 C<freeapis> Commandline Client
After installing this module, simply run the command C<freeapis> without
any arguments, and it will print information regarding a randomly selected
free API that is listed on its site. Below you may see a project familiar
to some in the Perl community, the L<https://world.openfoodfacts.org/> Project.
shell> freeapis
id: 174
lib/Acme/Free/Public/APIs.pm view on Meta::CPAN
title: (ð
) Church Calendar API
site URL: https://freepublicapis.com/church-calendar-api
methods: 2
health: 100
documentation: http://calapi.inadiutorium.cz/api-doc
description: The Church Calendar API provides access to calendar data for any day, allowing users to retrieve various liturgical celebrations and details. It supports multiple languages and enables specific queries for feast names and calendar de...
Found 1 API
=item C<random>
This subcommand takes no arguments. When run it prints out to C<STDOUT> all
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Geo/Whitwell/Name.pm view on Meta::CPAN
The generated names are guaranteed to have alternating consonants and vowels,
and should be pronounceable (though most likely bizarre). I have not been able
to locate the original documentation of the scheme, so I am unable to determine
why some example names are built in "reverse": with the first letter for the
latitude selected from the longitude table, and vice versa for the longitude. I
can only guess that the alternate construction was deemed more pronounceable or
"interesting". Since this is the case, I generate both alternatives so you can
choose the one that seems "better". In the cases of places like McMurdo Base
("Eeseepu Bymeem" or "Neeveil Amyny"), I'm not sure there I<is> a "better".
view all matches for this distribution
view release on metacpan or search on metacpan
examples/calendar.pl view on Meta::CPAN
set position => 'center';
on delete_event => \&quit;
widget VBox => contain {
widget Calendar => contain {
info id => 'cal';
on 'day-selected-double-click' => \&cal_double_clicked;
};
widget Button => contain {
set label => 'Quit';
on clicked => \&quit;
};
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Test/Builder.pm view on Meta::CPAN
}
sub _autoflush {
my($fh) = shift;
my $old_fh = select $fh;
$| = 1;
select $old_fh;
}
sub _dup_stdhandles {
my $self = shift;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Hyperindex.pm view on Meta::CPAN
use strict;
use Acme::Hyperindex;
my @struct = (
{ j_psi => [qw( eta_prime phi kaon )] },
{ j_psi => [qw( selectron down tau_sneutrino )] },
{ j_psi => [qw( upsilon gluino photino )] }
);
print @struct[[ 2, 'j_psi', 1 ]], "\n"; ### Prints gluino
my $row = @struct[[ 1, 'j_psi' ]]; ### Row contains [qw( selectron down tau_sneutrino )]
=head1 DESCRIPTION
When you use dynamic datastructures,
the perl index syntax may not be felxible enough.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/IEnumerable.pm view on Meta::CPAN
$counter += 0 + !! $predicate->($_);
}
Carp::confess("Impossible");
}
sub select {
my ($self, $projection) = @_;
return _create sub {
return sub {
state $base = $self->new();
my $item = $base->();
lib/Acme/IEnumerable.pm view on Meta::CPAN
}
#####################################################################
#
#####################################################################
# sub select_many { ... }
# sub contains { ... }
# sub sequence_equal { ... }
# sub distinct { ... }
# sub union { ... }
# sub except { ... }
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/IRC/Art.pm view on Meta::CPAN
...
my $art = Art->new(5,5);
$art->rectangle(0,0,4,4,2);
for ($art->result) {
$connection_irc->privmsg("#channel",$_);
select(undef,undef,undef,0.5);
}
=head1 DESCRIPTION
view all matches for this distribution
view release on metacpan or search on metacpan
t/acme-isitjson.t view on Meta::CPAN
my $perl = { this => 'is', Not => 'json' };
my $json = '{"but":"this","IS":"json"}';
open my $out, ">", \my $output or die $!;
select $out;
is_it_json ($perl);
like ($output, qr/a perl data structure/i);
note ($output);
$output = '';
view all matches for this distribution
view release on metacpan or search on metacpan
use strict;
use Test::More;
eval "use Test::Portability::Files";
plan skip_all => "Test::Portability::Files required for testing filenames portability" if $@;
# run the selected tests
run_tests();
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Keyakizaka46.pm view on Meta::CPAN
} else {
return sort {$a->$type <=> $b->$type} @members;
}
}
sub select {
my ($self, $type, $num_or_str, $operator, @members) = @_;
@members = $self->team_members() unless @members;
if ($type eq 'center') {
lib/Acme/Keyakizaka46.pm view on Meta::CPAN
my @hiragana_members = $keyaki->team_members('hiragana');
# retrieve the members under some conditions
my @sorted_by_age = $keyaki->sort('age', 'asc');
my @sorted_by_class = $keyaki->sort('class','desc');
my @selected_by_age = $keyaki->select('age', 18, '>=');
my @selected_by_class = $keyaki->select('class', 2, '==');
=head1 DESCRIPTION
"Keyakizaka46" is a Japanese famous idol group.
This module, Acme::Keyakizaka46, provides an easy method to catch up
lib/Acme/Keyakizaka46.pm view on Meta::CPAN
Returns the members sorted by the I<$type> field.
=back
=head2 select ( $type, $number, $operator [, @members] )
=over 4
# $type can be one of the same values above:
my @selected_members = $keyaki->select('age', 18, '>=');
Returns the members satisfy the given I<$type> condition. I<$operator>
must be a one of '==', '>=', '<=', '>', and '<'. This method compares
the given I<$type> to the member's one in the order below:
view all matches for this distribution
view release on metacpan or search on metacpan
Now and again men came, strangers, who talked excitedly, wheedlingly,
and in all kinds of fashions to the man in the red sweater. And at such
times that money passed between them the strangers took one or more of
the dogs away with them. Buck wondered where they went, for they never
came back; but the fear of the future was strong upon him, and he was
glad each time when he was not selected.
Yet his time came, in the end, in the form of a little weazened man who
spat broken English and many strange and uncouth exclamations which Buck
could not understand.
the snow in a snug ball, lay Billee. He whined placatingly, squirmed and
wriggled to show his good will and intentions, and even ventured, as a
bribe for peace, to lick Buck's face with his warm wet tongue.
Another lesson. So that was the way they did it, eh? Buck confidently
selected a spot, and with much fuss and waste effort proceeded to dig a
hole for himself. In a trice the heat from his body filled the confined
space and he was asleep. The day had been long and arduous, and he slept
soundly and comfortably, though he growled and barked and wrestled with
bad dreams.
the camp, and hunters there have been whom their tribesmen found with
throats slashed cruelly open and with wolf prints about them in the snow
greater than the prints of any wolf. Each fall, when the Yeehats follow
the movement of the moose, there is a certain valley which they never
enter. And women there are who become sad when the word goes over
the fire of how the Evil Spirit came to select that valley for an
abiding-place.
In the summers there is one visitor, however, to that valley, of which
the Yeehats do not know. It is a great, gloriously coated wolf, like,
and yet unlike, all other wolves. He crosses alone from the smiling
view all matches for this distribution
view release on metacpan or search on metacpan
FreeGLUT/freeglut-Readme.txt view on Meta::CPAN
To create a 32 bit freeglut application, create a new Win32 C++ project in MSVC.
From the Win32 Application Wizard, choose a Windows application, check the
Empty project box, and submit.
Youll now need to configure the compiler and linker settings. Open up the
project properties, and select All Configurations (this is necessary to ensure
our changes are applied for both debug and release builds). Open up the
general section under C/C++, and configure the include\ folder you created
above as an Additional Include Directory. If you have more than one GLUT
package which contains a glut.h file, its important to ensure that the
freeglut include folder appears above all other GLUT include folders.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/MUDLike.pm view on Meta::CPAN
#
# players get three execution contexts:
# * one for AJAX message posts without header/footer in the reply
# * one for COMET message pulls
# * the main HTML one below (which might only run once); arbitrarily selected as being the main one cuz its longest
#
$floor->insert($self);
while(1) {
lib/Acme/MUDLike.pm view on Meta::CPAN
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");
}
sub _who {
lib/Acme/MUDLike.pm view on Meta::CPAN
var jQuery = function(a,c) {
// If the context is global, return a new object
if ( window == this )
return new jQuery(a,c);
// Make sure that a selection was provided
a = a || document;
// HANDLE: $(function)
// Shortcut for document ready
if ( jQuery.isFunction(a) )
lib/Acme/MUDLike.pm view on Meta::CPAN
return this.setArray(
// HANDLE: $(array)
a.constructor == Array && a ||
// HANDLE: $(arraylike)
// Watch for when an array-like object is passed as the selector
(a.jquery || a.length && a != window && !a.nodeType && a[0] != undefined && a[0].nodeType) && jQuery.makeArray( a ) ||
// HANDLE: $(*)
[ a ] );
};
lib/Acme/MUDLike.pm view on Meta::CPAN
var s = jQuery.trim(arg), div = document.createElement("div"), tb = [];
var wrap =
// option or optgroup
!s.indexOf("<opt") &&
[1, "<select>", "</select>"] ||
(!s.indexOf("<thead") || !s.indexOf("<tbody") || !s.indexOf("<tfoot")) &&
[1, "<table>", "</table>"] ||
!s.indexOf("<tr") &&
lib/Acme/MUDLike.pm view on Meta::CPAN
className: "className",
value: "value",
disabled: "disabled",
checked: "checked",
readonly: "readOnly",
selected: "selected"
};
// IE actually uses filters for opacity ... elem is actually elem.style
if ( name == "opacity" && jQuery.browser.msie && value != undefined ) {
// IE has trouble with opacity if it does not have layout
lib/Acme/MUDLike.pm view on Meta::CPAN
// Form attributes
enabled: "!a.disabled",
disabled: "a.disabled",
checked: "a.checked",
selected: "a.selected||jQuery.attr(a,'selected')",
// Form elements
text: "a.type=='text'",
radio: "a.type=='radio'",
checkbox: "a.type=='checkbox'",
lib/Acme/MUDLike.pm view on Meta::CPAN
password: "a.type=='password'",
submit: "a.type=='submit'",
image: "a.type=='image'",
reset: "a.type=='reset'",
button: 'a.type=="button"||jQuery.nodeName(a,"button")',
input: "/input|select|textarea|button/i.test(a.nodeName)"
},
".": "jQuery.className.has(a,m[2])",
"@": {
"=": "z==m[4]",
"!=": "z!=m[4]",
lib/Acme/MUDLike.pm view on Meta::CPAN
}
// Initialize the search
var ret = [context], done = [], last = null;
// Continue while a selector expression exists, and while
// we're no longer looping upon ourselves
while ( t && last != t ) {
var r = [];
last = t;
t = jQuery.trim(t).replace( /^\/\//i, "" );
var foundToken = false;
// An attempt at speeding up child selectors that
// point to a specific element tag
var re = /^[\/>]\s*([a-z0-9*-]+)/i;
var m = re.exec(t);
if ( m ) {
lib/Acme/MUDLike.pm view on Meta::CPAN
jQuery.merge( done, ret );
// Reset the context
r = ret = [context];
// Touch up the selector string
t = " " + t.substr(1,t.length);
} else {
// Optomize for the case nodeName#idName
var re2 = /^([a-z0-9_-]+)(#)([a-z0-9\\*_-]*)/i;
lib/Acme/MUDLike.pm view on Meta::CPAN
if ( m ) {
m = [ 0, m[2], m[3], m[1] ];
} else {
// Otherwise, do a traditional filter check for
// ID, class, and element selectors
re2 = /^([#.]?)([a-z0-9\\*_-]*)/i;
m = re2.exec(t);
}
// Try to do a global search by ID, where we can
if ( m[1] == "#" && ret[ret.length-1].getElementById ) {
// Optimization for HTML document case
var oid = ret[ret.length-1].getElementById(m[2]);
// Do a quick check for the existence of the actual ID attribute
// to avoid selecting by the name attribute in IE
if ( jQuery.browser.msie && oid && oid.id != m[2] )
oid = jQuery('[@id="'+m[2]+'"]', ret[ret.length-1])[0];
// Do a quick check for node name (where applicable) so
// that div#foo searches will be really fast
lib/Acme/MUDLike.pm view on Meta::CPAN
t = t.replace( re2, "" );
}
}
// If a selector string still exists
if ( t ) {
// Attempt to filter it
var val = jQuery.filter(t,r);
ret = r = val.r;
t = jQuery.trim(val.t);
lib/Acme/MUDLike.pm view on Meta::CPAN
});
new function(){
jQuery.each( ("blur,focus,load,resize,scroll,unload,click,dblclick," +
"mousedown,mouseup,mousemove,mouseover,mouseout,change,select," +
"submit,keydown,keypress,keyup,error").split(","), function(i,o){
// Handle event binding
jQuery.fn[o] = function(f){
return f ? this.bind(o, f) : this.trigger(o);
view all matches for this distribution
view release on metacpan or search on metacpan
t/Acme-Machi.t view on Meta::CPAN
# Produced Tree-like structures should be the same whichever
# method you chose to use.
#############################################################
open my $fh, '>', \ my $my_string;
select $fh;
my $data;
$loli->have_the_habit_of('DFS');
$loli->search_file_from((<*>)[0],'.',0);
$result_DFS = $my_string;
eval "$result_DFS";
$result_DFS = $data;
open $fh, '>', \ $my_string;
select $fh;
$loli->have_the_habit_of('BFS');
$loli->search_file_from((<*>)[0],'.',0);
$result_BFS = $my_string;
eval "$result_BFS";
$result_BFS = $data;
select STDOUT;
sub cmp {
my $hash_ref1 = $_[0];
my $hash_ref2 = $_[1];
foreach my $k (sort keys %$hash_ref1){
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/Matrix.pm view on Meta::CPAN
: map { sprintf("\033[38;5;%sm%s", $COLOURS[$i++], $_) } @{ $WORDS[int(rand(scalar @WORDS))] }, $space;
}
print shift(@{$word_lines{$_}}) || $space;
}
print "\n";
select(undef, undef, undef, $delay);
}
}
sub shutdown {
print "\033[0m";
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/MetaSyntactic/counting_to_one.pm view on Meta::CPAN
# -*- encoding: utf-8; indent-tabs-mode: nil -*-
#
# Acme::MetaSyntactic::counting_to_one -- A selection of various movie titles
#
# Copyright (C) 2012 Jean Forget
#
# This program is free software; you can redistribute it and/or modify
# it under the same terms as Perl: either the Artistic License,
lib/Acme/MetaSyntactic/counting_to_one.pm view on Meta::CPAN
=item *
2012-10-21
Jean selected I<counting_to_one> as the theme name.
=item *
2012-09-25
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/MetaSyntactic/dangdut.pm view on Meta::CPAN
use parent qw(Acme::MetaSyntactic::MultiList);
__PACKAGE__->init;
1;
# ABSTRACT: A selection of popular Indonesian dangdut singers
=pod
=encoding UTF-8
=head1 NAME
Acme::MetaSyntactic::dangdut - A selection of popular Indonesian dangdut singers
=head1 VERSION
This document describes version 0.002 of Acme::MetaSyntactic::dangdut (from Perl distribution Acme-MetaSyntactic-dangdut), released on 2017-02-04.
view all matches for this distribution
view release on metacpan or search on metacpan
devdata/article.html view on Meta::CPAN
<div id="comment-form-identity">
<div id="comment-form-nascar">
<p>Isikan data di bawah atau klik salah satu ikon untuk log in:</p>
<ul>
<li class="selected" style="display:none;">
<a href="#comment-form-guest" id="postas-guest" title="Tamu">
<span></span>
</a>
</li>
<li>
devdata/article.html view on Meta::CPAN
</li>
<li>
</ul>
</div>
<div id="comment-form-guest" class="comment-form-service selected">
<div class="comment-form-padder">
<div class="comment-form-avatar">
<a href="https://gravatar.com/site/signup/" target="_blank"> <img src="https://1.gravatar.com/avatar/ad516503a11cd5ca435acc9bb6523536?s=25&d=retro&forcedefault=y&r=G" alt="Gravatar" width="25" class="no-grav" />
</a> </div>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/MetaSyntactic/vim.pm view on Meta::CPAN
ptlast
ptnext
ptNext
ptprevious
ptrewind
ptselect
put
pwd
pyfile
python
qall
lib/Acme/MetaSyntactic/vim.pm view on Meta::CPAN
startinsert
startreplace
stjump
stop
stopinsert
stselect
sunhide
sunmap
suspend
sview
syncbind
lib/Acme/MetaSyntactic/vim.pm view on Meta::CPAN
tNext
topleft
tprevious
trewind
try
tselect
tu
tunmenu
unabbreviate
undo
undojoin
lib/Acme/MetaSyntactic/vim.pm view on Meta::CPAN
scrolljump
scrolloff
scrollopt
sections
secure
selection
selectmode
sessionoptions
shell
shellcmdflag
shellpipe
shellquote
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/MetaSyntactic.pm view on Meta::CPAN
=item C<Acme::MetaSyntactic::Locale>
The theme is made of several collections of names, each associated with
a "language". The language is either passed as a constructor parameter,
extracted from the environment or a default is selected.
=item C<Acme::MetaSyntactic::MultiList>
The theme is made of several collections of names, each associated with
a "category". Categories can include sub-categories, etc, I<ad infinitum>
(or when disk space or memory is exhausted, whichever happens first).
The category is either passed as a constructor parameter or the default
value is selected.
=item C<Acme::MetaSyntactic::Alias>
The theme is simply an alias of another theme. All items are identical,
as the original behaviour. The only difference is the theme name.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/MomoiroClover.pm view on Meta::CPAN
else {
return sort {$a->$type <=> $b->$type} @members;
}
}
sub select {
my ($self, $type, $number, $operator, @members) = @_;
$self->_die('invalid operator was passed in')
unless grep {$operator eq $_} qw(== >= <= > <);
lib/Acme/MomoiroClover.pm view on Meta::CPAN
my @at_some_time_members = $momoclo_chan->members(Date::Simple->new('2001-01-01'));
# retrieve the members under some conditions
my @sorted_by_age = $momoclo_chan->sort('age', 1);
my @sorted_by_class = $momoclo_chan->sort('class', 1);
my @selected_by_age = $momoclo_chan->select('age', 17, '>=');
my @selected_by_class = $momoclo_chan->select('class', 5, '==');
=head1 DESCRIPTION
"Morning Clover" is one of highly famous Japanese lock stars.
lib/Acme/MomoiroClover.pm view on Meta::CPAN
Returns the members sorted by the I<$type> field.
=back
=head2 select ( $type, $number, $operator [, @members] )
=over 4
# $type can be one of the same values above:
my @selected_members = $momoclo_chan->select('age', 17, '>=');
Returns the members satisfy the given I<$type> condition. I<$operator>
must be a one of '==', '>=', '<=', '>', and '<'. This method compares
the given I<$type> to the member's one in the order below:
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/MorningMusume/ShinMember.pm view on Meta::CPAN
=cut
sub info {
my $musume = Acme::MorningMusume->new;
my @musume = $musume->select('age', 0, '<'); # all of 'em!
my ($mom, $dad) = @musume[rand(@musume), rand(@musume)];
my %attributes;
$attributes{first_name_en} = $mom->first_name_en;
$attributes{first_name_ja} = $mom->first_name_ja;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Acme/MorningMusume.pm view on Meta::CPAN
else {
return sort {$a->$type <=> $b->$type} @members;
}
}
sub select {
my ($self, $type, $number, $operator, @members) = @_;
$self->_die('invalid operator was passed in')
unless grep {$operator eq $_} qw(== >= <= > <);
lib/Acme/MorningMusume.pm view on Meta::CPAN
my @at_some_time_members = $musume->members(DateTime->now->subtract(years => 5));
# retrieve the members under some conditions
my @sorted_by_age = $musume->sort('age', 1);
my @sorted_by_class = $musume->sort('class', 1);
my @selected_by_age = $musume->select('age', 18, '>=');
my @selected_by_class = $musume->select('class', 5, '==');
=head1 DESCRIPTION
"Morning Musume" is one of highly famous Japanese pop stars.
lib/Acme/MorningMusume.pm view on Meta::CPAN
Returns the members sorted by the I<$type> field.
=back
=head2 select ( $type, $number, $operator [, @members] )
=over 4
# $type can be one of the same values above:
my @selected_members = $musume->select('age', 18, '>=');
Returns the members satisfy the given I<$type> condition. I<$operator>
must be a one of '==', '>=', '<=', '>', and '<'. This method compares
the given I<$type> to the member's one in the order below:
view all matches for this distribution