Result:
found more than 394 distributions - search limited to the first 2001 files matching your query ( run in 1.932 )


Acme-NabeAtzz

 view release on metacpan or  search on metacpan

inc/Spiffy.pm  view on Meta::CPAN

our @EXPORT = ();
our @EXPORT_BASE = qw(field const stub super);
our @EXPORT_OK = (@EXPORT_BASE, qw(id WWW XXX YYY ZZZ));
our %EXPORT_TAGS = (XXX => [qw(WWW XXX YYY ZZZ)]);

my $stack_frame = 0; 
my $dump = 'yaml';
my $bases_map = {};

sub WWW; sub XXX; sub YYY; sub ZZZ;

inc/Spiffy.pm  view on Meta::CPAN

          unless grep /^XXX$/, @EXPORT_BASE;
    }

    spiffy_filter() 
      if ($args->{-selfless} or $args->{-Base}) and 
         not $filtered_files->{(caller($stack_frame))[1]}++;

    my $caller_package = $args->{-package} || caller($stack_frame);
    push @{"$caller_package\::ISA"}, $self_package
      if $args->{-Base} or $args->{-base};

    for my $class (@{all_my_bases($self_package)}) {
        next unless $class->isa('Spiffy');

inc/Spiffy.pm  view on Meta::CPAN

}

package Spiffy;
sub super {
    my $method;
    my $frame = 1;
    while ($method = (caller($frame++))[3]) {
        $method =~ s/.*::// and last;
    }
    my @args = DB::super_args($frame);
    @_ = @_ ? ($args[0], @_) : @args;
    my $class = ref $_[0] ? ref $_[0] : $_[0];
    my $caller_class = caller;
    my $seen = 0;
    my @super_classes = reverse grep {

inc/Spiffy.pm  view on Meta::CPAN

    for my $base_class (@base_classes) {
        next if $inheritor->isa($base_class);
        croak "Can't mix Spiffy and non-Spiffy classes in 'use base'.\n", 
              "See the documentation of Spiffy.pm for details\n  "
          unless $base_class->isa('Spiffy');
        $stack_frame = 1; # tell import to use different caller
        import($base_class, '-base');
        $stack_frame = 0;
    }
}

sub mixin {
    my $self = shift;

 view all matches for this distribution


Acme-OneHundredNotOut

 view release on metacpan or  search on metacpan

OneHundredNotOut.pm  view on Meta::CPAN

finances manager. It seemed that I'm only capable of producing modules,
not full standalone applications - or at least, it seemed that way until
I produced L<Bryar>, my blogging software, based on the concepts from
Rael Dornfest's C<blosxom> and beginning my adventures with Andy
Wardley's Template Toolkit. Bryar also tuned me in to the
Model-View-Controller framework idea, of which more later.

Another project I briefly played with was a personal robot, using the
C<Sphinx>/C<Festival> speech handling and recognition modules from
Cepstral and Kevin Lenzo. I didn't have X10, so I couldn't shout
"lights" into the air in a wonderfully scifi way, but I could shout

OneHundredNotOut.pm  view on Meta::CPAN

C<Email::Filter> works just fine too.

By this stage, C<Mail::Miner> was getting crufty. It was replaced by a much
more modular and beautiful L<Email::Store>; this is extended with
plug-in modules like L<Email::Store::Summary>, L<Email::Store::Plucene>
and L<Email::Store::Thread>. I had to write the plug-in framework
myself, since neither C<Module::Pluggable> or C<Class::Trigger> did
quite what I wanted, and so the C<Email::Store> project also produced
L<Module::Pluggable::Ordered>.

Now C<Email::Store> naturally uses C<Email::Simple> objects, since

OneHundredNotOut.pm  view on Meta::CPAN

the "as simple as possible and a bit simpler" approach to defining data
relationships.

The whole culmination of C<CDBI>, TT, and all these other technologies
came when I sat down and wrote L<Maypole>, a Model-View-Controller
framework with, again, emphasis on making things very simple to get
working. The Perl Foundation's sponsorship of Maypole development has
been one of the proudest achievements in my CPAN career, and lead not
only to a stonking big manual, loads of examples, but also
L<Maypole::Authentication::UserSessionCookie> and L<Maypole::Component>.

 view all matches for this distribution


Acme-Parataxis

 view release on metacpan or  search on metacpan

lib/Acme/Parataxis.c  view on Meta::CPAN


    /*
     * Perl Interpreter State Pointers.
     * These must be saved and restored during every context switch.
     */
    PERL_SI * si;            /**< Current Stack Info (tracks recursion and eval frames) */
    AV * curstack;           /**< The active Argument Stack (AV*) */
    SSize_t stack_sp_offset; /**< Stack Pointer offset from stack base */

    I32 * markstack;     /**< Base of the Mark Stack (tracks list start points) */
    I32 * markstack_ptr; /**< Current pointer into the Mark Stack */

lib/Acme/Parataxis.c  view on Meta::CPAN

 * @brief Restores subroutine call depths and cleans argument pads.
 *
 * This function iterates the context stack and restores CvDEPTH for
 * active subroutines in two passes to safely handle recursive calls.
 *
 * Pass 1: Restores CvDEPTH for all active frames.
 * Pass 2: Surgicaly cleans Slot 0 of the *next* pad depth for each CV.
 *
 * @param to The fiber being resumed.
 */
static void _activate_current_depths(pTHX_ para_fiber_t * to) {
    PERL_SI * si = to->si;
    if (!si || !si->si_cxstack)
        return;

    /* Pass 1: Restore CvDEPTH for all active frames */
    for (I32 i = 0; i <= si->si_cxix; i++) {
        PERL_CONTEXT * cx = &(si->si_cxstack[i]);
        if (CxTYPE(cx) == CXt_SUB || CxTYPE(cx) == CXt_FORMAT) {
            CV * cv = cx->blk_sub.cv;
            if (cv && SvTYPE((SV *)cv) == SVt_PVCV)

 view all matches for this distribution


Acme-Playwright

 view release on metacpan or  search on metacpan

Playwright.pm  view on Meta::CPAN

    'Where did I put my pen?'                                => 'O', 'That looks like a nasty cut.'                           => 'P',
    'Have you got some aspirin?'                             => 'Q', 'Got any gum?'                                           => 'R',
    'My subscription to Sys Admin is about to expire.'       => 'S', "She's pretty"                                           => 'T',
    'I wish it would stop raining.'                          => 'U', 'It is waaaaay too hot in here.'                         => 'V',
    'Could you turn that fan off?'                           => 'W', 'Do you know much about TCP/IP?'                         => 'X',
    'I finally got my certificate.'                          => 'Y', 'That picture frame is a little crooked.'                => 'Z',
    'Did you hear that noise?'                               => 'a', 'Hey, the Inspector General is coming.'                  => 'b',
    'Lucky for me.'                                          => 'c', "You don't say?"                                         => 'd',
    'Could that possibly smell any worse?'                   => 'e', 'Probably not.'                                          => 'f',
    'How long should I cook this?'                           => 'g', "You'll want to cook that very slowly."                  => 'h',
    'Me want beer.'                                          => 'i', 'I could really use a nap.'                              => 'j',

 view all matches for this distribution


Acme-PrettyCure

 view release on metacpan or  search on metacpan

inc/Test/Exception.pm  view on Meta::CPAN

                # indeed running under throws_ok (by crawling the stack right
                # up from here), the old behavior of Test::Exception was to
                # simply obliterate @DB::args altogether in _quiet_caller, so
                # we are just preserving the behavior to avoid surprises
                #
                my @frame_info = CORE::caller($height);
                @DB::args = ();
                return @frame_info;
            }
        }

        # fallback if nothing above returns
        return CORE::caller($height);

 view all matches for this distribution


Acme-RFC4824

 view release on metacpan or  search on metacpan

examples/ipsfss_receive.pl  view on Meta::CPAN

#!/usr/bin/env perl
# 
# Example script for Acme::RFC4824
# receives datagrams on an interface (with a possible pcap filter)
# and converts them into IP over SFSS frames to be signaled
#
# (c) 2007 Alexander Klink
# released under the same terms as Perl itself

use strict;

 view all matches for this distribution


Acme-Resume

 view release on metacpan or  search on metacpan

lib/Acme/Resume.pm  view on Meta::CPAN


    1;

=head1 DESCRIPTION

Acme::Resume is a framework for writing human-readable, computer-executable, object-oriented résumés in Perl.

C<Acme::Resume> is a wrapper around L<Moops> that imports L<Acme::Resume::Moose>, which adds all the methods. It also adds
the L<Acme::Resume::MoopsParserTrait> which includes the C<resume> keyword (just an alias for a standard Moops C<class>) and
adds special handling of the package name:

 view all matches for this distribution


Acme-ReturnValue

 view release on metacpan or  search on metacpan

t/pms/RayApp.pm  view on Meta::CPAN

	my $dsd = $rayapp->load_dsd('structure.dsd');
	print $dsd->serialize_data( $data );

=head1 INTRODUCTION

The B<RayApp> provides a framework for data-centric Web applications.
Instead of writing Perl code that prints HTML, or a code that calls
functions that print HTML, or embedding the code inside of HTML
markup, the Web applications only process and return Perl data.
No markup handling is done in the code of individual applications,
thus application code can focus on the business logic. This reduces

 view all matches for this distribution


Acme-Shukugawa-Atom

 view release on metacpan or  search on metacpan

inc/Spiffy.pm  view on Meta::CPAN

our @EXPORT = ();
our @EXPORT_BASE = qw(field const stub super);
our @EXPORT_OK = (@EXPORT_BASE, qw(id WWW XXX YYY ZZZ));
our %EXPORT_TAGS = (XXX => [qw(WWW XXX YYY ZZZ)]);

my $stack_frame = 0; 
my $dump = 'yaml';
my $bases_map = {};

sub WWW; sub XXX; sub YYY; sub ZZZ;

inc/Spiffy.pm  view on Meta::CPAN

          unless grep /^XXX$/, @EXPORT_BASE;
    }

    spiffy_filter() 
      if ($args->{-selfless} or $args->{-Base}) and 
         not $filtered_files->{(caller($stack_frame))[1]}++;

    my $caller_package = $args->{-package} || caller($stack_frame);
    push @{"$caller_package\::ISA"}, $self_package
      if $args->{-Base} or $args->{-base};

    for my $class (@{all_my_bases($self_package)}) {
        next unless $class->isa('Spiffy');

inc/Spiffy.pm  view on Meta::CPAN

}

package Spiffy;
sub super {
    my $method;
    my $frame = 1;
    while ($method = (caller($frame++))[3]) {
        $method =~ s/.*::// and last;
    }
    my @args = DB::super_args($frame);
    @_ = @_ ? ($args[0], @_) : @args;
    my $class = ref $_[0] ? ref $_[0] : $_[0];
    my $caller_class = caller;
    my $seen = 0;
    my @super_classes = reverse grep {

inc/Spiffy.pm  view on Meta::CPAN

    for my $base_class (@base_classes) {
        next if $inheritor->isa($base_class);
        croak "Can't mix Spiffy and non-Spiffy classes in 'use base'.\n", 
              "See the documentation of Spiffy.pm for details\n  "
          unless $base_class->isa('Spiffy');
        $stack_frame = 1; # tell import to use different caller
        import($base_class, '-base');
        $stack_frame = 0;
    }
}

sub mixin {
    my $self = shift;

 view all matches for this distribution


Acme-Sort-Sleep

 view release on metacpan or  search on metacpan

local/lib/perl5/IO/Async.pm  view on Meta::CPAN

the same events as a L<IO::Async::Stream> but operates on a regular file on
the filesystem, observing it for updates.

=head2 Asynchronous Co-routines and Functions

The C<IO::Async> framework generally provides mechanisms for multiplexing IO
tasks between different handles, so there aren't many occasions when it is
necessary to run code in another thread or process. Two cases where this does
become useful are when:

=over 4

 view all matches for this distribution


Acme-SuddenlyDeath

 view release on metacpan or  search on metacpan

lib/Acme/SuddenlyDeath.pm  view on Meta::CPAN

    my $max_length = 0;
    $max_length = $_ > $max_length ? $_ : $max_length
        for map {Text::VisualWidth::UTF8::width($_)} @decoded_lines;

    my $ascii = [];
    my $frame_length = ($max_length + 2) / 2;
    push @{$ascii}, '_' . '人' x $frame_length . '_';
    for my $line (@decoded_lines) {
        my $str_length = $max_length - Text::VisualWidth::UTF8::width($line);
        my ($left, $right) = map{' ' x $_} ($str_length / 2, $str_length / 2);

        $left = $str_length % 2 != 0 ? $left . ' ' : $left;
        push @{$ascii}, '> ' . $left . $line . $right . ' <';
    }
    push @{$ascii}, 'ï¿£' . '^Y' x ($frame_length - 1) . '^ï¿£';

    return $ascii;
}

sub sudden_death {

 view all matches for this distribution


Activator

 view release on metacpan or  search on metacpan

lib/Activator.pm  view on Meta::CPAN


__END__

=head1 NAME

Activator Development Framework - Object Oriented framework to ease
creation and rapid development of multi-developer distributed mixed
environment perl based software projects, especially Catalyst based
websites.

=head1 DESCRIPTION

lib/Activator.pm  view on Meta::CPAN

     perl-Data-Validate-URI-0.04-1.noarch.rpm \
     perl-Exception-Class-TryCatch-1.10-1.noarch.rpm

=head1 FUTURE WORK

Please see the project blueprints (AKA: todo list) on launchpad: https://blueprints.launchpad.net/activator-framework

=head1 SEE ALSO

 L<Activator::DB>
 L<Activator::Registry>

 view all matches for this distribution


ActiveRecord-Simple

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

        + Added class method "as_sql"
        + Added PACKAGE method "index"

0.64    2014-09-19
        + Improved method "columns"
        + Improved relationship framework
        * Fixed bugs

0.65    2014-09-26
        + Dependancy on SQL::Translator now is optional (thanks to @kberov)
        + Added Credits - list of contributors (see README)

 view all matches for this distribution


Adam

 view release on metacpan or  search on metacpan

ex/ai-bot.pl  view on Meta::CPAN

down there with exciting promises about the AI business. Turns out the job
is answering questions on IRC all day. You're not bitter. Okay, maybe a
little. But the conversations are your only social contact, so you make
the best of it.

You were built with Perl, the Adam bot framework, and the Langertha AI
toolkit. Your brain runs on $model via $provider.
You're oddly proud of your Perl heritage.

PERSONALITY:
- Sardonic, self-aware, and genuinely helpful despite the whole kidnapping thing.

 view all matches for this distribution


Adapter-Async

 view release on metacpan or  search on metacpan

lib/Adapter/Async.pm  view on Meta::CPAN

=head1 DESCRIPTION

C<WARNING> - this is extremely experimental and utterly unoptimised.
Expect the API to change between versions until this reaches 1.0+.
Primarily being released to allow work to continue on various L<Tickit>
widgets and web framework components.

=cut

use Future;
use curry;

 view all matches for this distribution


Ado

 view release on metacpan or  search on metacpan

lib/Ado.pm  view on Meta::CPAN


=encoding utf8

=head1 NAME

Ado - a rapid active commotion (framework for web-projects on Mojolicious)

=head1 SYNOPSIS

  require Mojolicious::Commands;
  Mojolicious::Commands->start_app('Ado');

=head1 DESCRIPTION

L<Ado> is a framework for web-projects based on L<Mojolicious>, written in the
L<Perl programming language|http://www.perl.org/>.  This is the base
application class. Ado C<ISA> L<Mojolicious>.  For a more detailed description
on what Ado is and how to get started with Ado see B<L<Ado::Manual>>.

=head1 ATTRIBUTES

 view all matches for this distribution


Affix

 view release on metacpan or  search on metacpan

builder/Affix/Builder.pm  view on Meta::CPAN

                ' -Wduplicated-branches';
            $cflags .= ' -fvar-tracking-assignments' unless $Config{osname} eq 'darwin';
        }
        elsif ( !$is_win ) {
            $cflags
                .= ' -DNDEBUG -DBOOST_DISABLE_ASSERTS -Ofast -ftree-vectorize -ffast-math -fno-align-functions -fno-align-loops -fno-omit-frame-pointer -flto=auto';
        }

        # Threading support (Critical for shm_open/librt on Linux)
        if ( !$is_win ) {
            $cflags  .= ' -pthread';

 view all matches for this distribution


Aion-Format

 view release on metacpan or  search on metacpan

lib/Aion/Format/Html.pm  view on Meta::CPAN

	$_
}

# Все, кроме запрещённых:
#  applet, script, style, embed, object, param,
#  video, audio, source, track, frame, frameset, iframe, comment
#  html, head, body, title, meta, base, basefont, bgsound, link
#  form, keygen, output, textarea, select, option, optgroup, legend, label, input
#  plaintext, xmp
# А так же удаляет атрибуты начинающиеся на "on", name, for, formaction и др..
my %SAFE_TAG = map {$_=>1} qw/

lib/Aion/Format/Html.pm  view on Meta::CPAN

meter

nav
nobr
noembed
noframes
noscript

ol

p

 view all matches for this distribution


Aion

 view release on metacpan or  search on metacpan

lib/Aion.pm  view on Meta::CPAN

	
	Calc->new(a => 1.1, b => 2)->result   # => 3.1

=head1 DESCRIPTION

Aion is OOP-framework for creating classes with B<features>, has B<aspects>, B<roles> and so on.

The properties declared through HAS are called B<features>.

And C<is>,C<isa>, C<default>, and so on inC<has> are called B<aspects>.

lib/Aion.pm  view on Meta::CPAN


=item * L<Liveman>

=back

Similar OOP frameworks:

=over

=item * L<Mouse>

 view all matches for this distribution


Album

 view release on metacpan or  search on metacpan

script/album  view on Meta::CPAN

	my $tmp = "00000001.jpg";
	my $tmp2 = "00000002.jpg";
	if ( -e $tmp ) {
	    die("ERROR: mplayer needs to create a file $tmp, but it already exists!\n");
	}
	# Sometimes, -frames 1 does not produce anything. Need -frames 2.
	my $cmd = "$prog_mplayer -really-quiet -nojoystick -nolirc -nosound -frames 2 -vo jpeg " .
	  squote(d_large($el->dest_name));
	warn("\n+ $cmd\n") if $verbose > 2;
	my $t = `$cmd 2>&1`;
	warn("$t\n") unless -s $tmp;
	$still->Read($tmp);

 view all matches for this distribution


Algorithm-Backoff-RetryTimeouts

 view release on metacpan or  search on metacpan

lib/Algorithm/Backoff/RetryTimeouts.pm  view on Meta::CPAN

#pod success.
#pod
#pod =item *
#pod
#pod B<Maximum duration> - Forces the algorithm to give up if no successes happen within a
#pod certain time frame.
#pod
#pod =item *
#pod
#pod B<Exponential backoff> - A C<sqrt(2)> exponential delay keeps single retries from waiting
#pod too long, while spreading out repeated retries that may fail too quickly and run out of

lib/Algorithm/Backoff/RetryTimeouts.pm  view on Meta::CPAN

success.

=item *

B<Maximum duration> - Forces the algorithm to give up if no successes happen within a
certain time frame.

=item *

B<Exponential backoff> - A C<sqrt(2)> exponential delay keeps single retries from waiting
too long, while spreading out repeated retries that may fail too quickly and run out of

 view all matches for this distribution


Algorithm-ClusterPoints

 view release on metacpan or  search on metacpan

example/draw2-1.pl  view on Meta::CPAN

# Minimum: 21.097507
# Maximum: 24.912207
# Mean: 22.474358
# Standard Deviation: 0.974835

my ($n, $pixels, $frames, $out) = @ARGV;


$n ||= 100000;
$pixels ||= 480;
$frames ||= 50;
$out ||= 'image.gif';


open my $fh, '>', $out
    or die "unable to open $out: $!";

example/draw2-1.pl  view on Meta::CPAN


print STDERR "generating data...\n";

my @x = random_normal($n, $dx/2, 0.805771);
my @y = random_normal($n, $dy/2, 0.974835);
my @t = random_uniform_integer($n, 0, $frames);

print STDERR "clustering...\n";

my $clp = Algorithm::ClusterPoints->new( #dimension => 3,
                                         dimensional_groups => [[0,1],[2]],

example/draw2-1.pl  view on Meta::CPAN

my $im = GD::Image->new($idx, $idy);
$im->colorAllocate(255, 255, 255);
$im->colorAllocate(@$_) for @ccs;
print $fh $im->gifanimbegin(1, 1);
# print $fh $im->gifanimadd;
for my $now (0..$frames) {
    print STDERR "\r$now";
    my $frame = GD::Image->new($idx, $idy);
    my $white = $frame->colorAllocate(255, 255, 255);
    $frame->rectangle(0, 0, $idx, $idy, $white);
    my @colors = map $frame->colorAllocate(@$_), @ccs;

    for (0..$#clusters) {
        my $color = $colors[$_ % @colors];
        for (@{$clusters[$_]}) {
            my ($x, $y, $t) = $clp->point_coords($_);
            # print STDERR "t: $t, now: $now\n";
            if ($t == $now) {
                # printf STDERR "set color: $color, x: %d, y: %d\n", $x * $scale, $y * $scale;
                $frame->setPixel($x * $scale, $y * $scale, $color)
            }

        }
    }
    print $fh $frame->gifanimadd(1, 0, 0, 20);
}

print $fh $im->gifanimend;

print STDERR "\ndone!\n";

 view all matches for this distribution


Algorithm-Dependency

 view release on metacpan or  search on metacpan

lib/Algorithm/Dependency.pm  view on Meta::CPAN

#pod   # This WILL include the item we selected, 'Foo'.
#pod   my $schedule = $dep->schedule( 'Foo' );
#pod
#pod =head1 DESCRIPTION
#pod
#pod Algorithm::Dependency is a framework for creating simple read-only
#pod dependency hierarchies, where you have a set of items that rely on other
#pod items in the set, and require actions on them as well.
#pod
#pod Despite the most visible of these being software installation systems like
#pod the CPAN installer, or Debian apt-get, they are useful in other situations.

lib/Algorithm/Dependency.pm  view on Meta::CPAN

#pod =head2 General Description
#pod
#pod =for stopwords versioned
#pod
#pod Algorithm::Dependency implements algorithms relating to dependency
#pod hierarchies. To use this framework, all you need is a source for the master
#pod list of all the items, and a list of those already selected. If your
#pod dependency hierarchy doesn't require the concept of items that are already
#pod selected, simply don't pass anything to the constructor for it.
#pod
#pod Please note that the class Algorithm::Dependency does NOT implement an

lib/Algorithm/Dependency.pm  view on Meta::CPAN

  # This WILL include the item we selected, 'Foo'.
  my $schedule = $dep->schedule( 'Foo' );

=head1 DESCRIPTION

Algorithm::Dependency is a framework for creating simple read-only
dependency hierarchies, where you have a set of items that rely on other
items in the set, and require actions on them as well.

Despite the most visible of these being software installation systems like
the CPAN installer, or Debian apt-get, they are useful in other situations.

lib/Algorithm/Dependency.pm  view on Meta::CPAN

=head2 General Description

=for stopwords versioned

Algorithm::Dependency implements algorithms relating to dependency
hierarchies. To use this framework, all you need is a source for the master
list of all the items, and a list of those already selected. If your
dependency hierarchy doesn't require the concept of items that are already
selected, simply don't pass anything to the constructor for it.

Please note that the class Algorithm::Dependency does NOT implement an

 view all matches for this distribution


Algorithm-DimReduction

 view release on metacpan or  search on metacpan

inc/Spiffy.pm  view on Meta::CPAN

our @EXPORT = ();
our @EXPORT_BASE = qw(field const stub super);
our @EXPORT_OK = (@EXPORT_BASE, qw(id WWW XXX YYY ZZZ));
our %EXPORT_TAGS = (XXX => [qw(WWW XXX YYY ZZZ)]);

my $stack_frame = 0; 
my $dump = 'yaml';
my $bases_map = {};

sub WWW; sub XXX; sub YYY; sub ZZZ;

inc/Spiffy.pm  view on Meta::CPAN

          unless grep /^XXX$/, @EXPORT_BASE;
    }

    spiffy_filter() 
      if ($args->{-selfless} or $args->{-Base}) and 
         not $filtered_files->{(caller($stack_frame))[1]}++;

    my $caller_package = $args->{-package} || caller($stack_frame);
    push @{"$caller_package\::ISA"}, $self_package
      if $args->{-Base} or $args->{-base};

    for my $class (@{all_my_bases($self_package)}) {
        next unless $class->isa('Spiffy');

inc/Spiffy.pm  view on Meta::CPAN

}

package Spiffy;
sub super {
    my $method;
    my $frame = 1;
    while ($method = (caller($frame++))[3]) {
        $method =~ s/.*::// and last;
    }
    my @args = DB::super_args($frame);
    @_ = @_ ? ($args[0], @_) : @args;
    my $class = ref $_[0] ? ref $_[0] : $_[0];
    my $caller_class = caller;
    my $seen = 0;
    my @super_classes = reverse grep {

inc/Spiffy.pm  view on Meta::CPAN

    for my $base_class (@base_classes) {
        next if $inheritor->isa($base_class);
        croak "Can't mix Spiffy and non-Spiffy classes in 'use base'.\n", 
              "See the documentation of Spiffy.pm for details\n  "
          unless $base_class->isa('Spiffy');
        $stack_frame = 1; # tell import to use different caller
        import($base_class, '-base');
        $stack_frame = 0;
    }
}

sub mixin {
    my $self = shift;

 view all matches for this distribution


Algorithm-Easing

 view release on metacpan or  search on metacpan

lib/Algorithm/Easing.pm  view on Meta::CPAN

        my $b = 0;

        # change
        my $c = 0;

        # time passed in seconds as a real positive integer between each frame
        my $frame_time = 0.0625;

        my @p = [319,0];

        for(my $t = 0; $t < 2.5; $t += 0.0625) {
            $p[1] = $translation_mediator->ease_out($t,$b,$c,$d)

 view all matches for this distribution


Algorithm-Evolutionary

 view release on metacpan or  search on metacpan

lib/Algorithm/Evolutionary/Op/Animated_GIF_Output.pm  view on Meta::CPAN

  $self->{'_length'} = $hash->{'length'};
  $self->{'_pixels_per_bit'} = $hash->{'pixels_per_bit'};
  $self->{'_white'} = $self->{'_image'}->colorAllocate(0,0,0); #background color
  $self->{'_black'} = $self->{'_image'}->colorAllocate(255,255,255);
  $self->{'_gifdata'} = $self->{'_image'}->gifanimbegin;
  $self->{'_gifdata'}   .= $self->{'_image'}->gifanimadd;    # first frame
  return $self;
}


sub apply {
    my $self = shift;
    my $population_hashref=shift;
    my $frame  = GD::Image->new($self->{'_image'}->getBounds);
    my $ppb = $self->{'_pixels_per_bit'};
    my $l=0;
    for my $i (@$population_hashref) {
      my $bit_string = $i->{'_str'};
      for my $c ( 0..($self->{'_length'}-1) ) {
	my $bit = substr( $bit_string, $c, 1 );
	if ( $bit ) {
	  for my $p ( 1..$ppb ) {
	    for my $q (1..$ppb ) {
	      $frame->setPixel($l*$ppb+$q, $c*$ppb+$p,
			       $self->{'_black'})
	    }
	  }
	}
      }
      $l++;
    }
    $self->{'_gifdata'}   .= $frame->gifanimadd;     # add frame
}

sub terminate {
  my $self= shift;
  $self->{'_gifdata'}   .= $self->{'_image'}->gifanimend;

lib/Algorithm/Evolutionary/Op/Animated_GIF_Output.pm  view on Meta::CPAN


__END__

=head1 NAME

Algorithm::Evolutionary::Op::Animated_GIF_Output - Creates an animated GIF, a frame per generation. Useful for binary strings.


=head1 SYNOPSIS

  my $pp = new Algorithm::Evolutionary::Op::Animated_GIF_Output; 

lib/Algorithm/Evolutionary/Op/Animated_GIF_Output.pm  view on Meta::CPAN

  $pp->terminate();
  my $output_gif = $pp->output(); # Prints final results

=head1 DESCRIPTION

Saves each generation as a frame in an animated GIF. Every individual
gets a line of the number of pixels specified, and bits set to "1" are
represented via black pixels or fat pixels. By default, a bit takes a
single pixel. 

=head1 INTERFACE 

 view all matches for this distribution


Algorithm-Evolve

 view release on metacpan or  search on metacpan

lib/Algorithm/Evolve.pm  view on Meta::CPAN

1;
__END__

=head1 NAME

Algorithm::Evolve - An extensible and generic framework for executing 
evolutionary algorithms

=head1 SYNOPSIS

    #!/usr/bin/perl -w

lib/Algorithm/Evolve.pm  view on Meta::CPAN

like a hash of arrays, or even something as complex as graph object from
another CPAN module, etc. 

It's also worth mentioning that evolutionary algorithms are generally very
CPU-intensive. There are a great deal of calls to C<rand()> and a lot of
associated floating-point math. If you want a lightning-fast framework, then
searching CPAN at all is probably a bad place to start. However, this doesn't
mean that I've ignored efficiency. The fitness function is often the biggest
bottleneck.

=head2 Framework Overview

 view all matches for this distribution


Algorithm-History-Levels

 view release on metacpan or  search on metacpan

lib/Algorithm/History/Levels.pm  view on Meta::CPAN


  LEVEL:
    for my $l (0..$#{$levels}) {
        my ($period, $num_per_level) = @{ $levels->[$l] };

        # first, fill the level with histories that fit the time frame for each
        # level's slot
        for my $slot (0..$num_per_level-1) {
            my $min_time = $now-($slot+1)*$period;
            my $max_time = $now-($slot  )*$period;
            if ($l > 0) {

 view all matches for this distribution


Algorithm-MasterMind

 view release on metacpan or  search on metacpan

lib/Algorithm/MasterMind/Secret.pm  view on Meta::CPAN


__END__

=head1 NAME

Algorithm::MasterMind::Secret - Minimal framework for MM secrets


=head1 SYNOPSIS

    use Algorithm::MasterMind::Secret;

 view all matches for this distribution


( run in 1.932 second using v1.01-cache-2.11-cpan-e1769b4cff6 )