Attribute-Generator

 view release on metacpan or  search on metacpan

inc/Spiffy.pm  view on Meta::CPAN

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

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

# This line is here to convince "autouse" into believing we are autousable.
sub can {
    ($_[1] eq 'import' and caller()->isa('autouse'))
        ? \&Exporter::import        # pacify autouse's equality test
        : $_[0]->SUPER::can($_[1])  # normal case
}

# TODO
#
# Exported functions like field and super should be hidden so as not to
# be confused with methods that can be inherited.
#

sub new {
    my $class = shift;

lib/Attribute/Generator.pm  view on Meta::CPAN

        };

        $stack[-2]->throw($@) if $@;
        while() {
            pop(@stack)->transfer($stack[-1]);
            delete $stack[-1]{_sent}; # clear send()ed.
        }
    }

    sub new {
        shift->SUPER::new(\&_run_generator, @_)
    }

    sub next {
        my($self) = @_;
        push @stack, $self;
        $stack[-2]->transfer($self); # resume
        my $ret = delete $self->{_sent} or return;
        wantarray ? @$ret : $ret->[0];
    }



( run in 0.263 second using v1.01-cache-2.11-cpan-a9ef4e587e4 )