Acme-ComeFrom
view release on metacpan or search on metacpan
comefrom &NAME
The "comefrom-&NAME" form is quite different from the other forms of
"comefrom". In fact, it isn't a comefrom in the normal sense at all,
and doesn't have the stigma associated with other "comefrom"s.
Instead, it installs a post-processing handler for the subroutine,
and a jump would be made just *after* the subroutine's execution.
If two or more "comefrom" were applied to the same LABEL, EXPR or NAME,
they will be executed simultaneously via "fork()". The forking are
ordered by their occurrances, with the parent process receiving the last
one.
BUGS
This module does not really parse perl; it guesses label names quite
accurately, but the regex matching the "comefrom" itself could catch
many false-positives. Perhaps some day a brave soul somewhere will
volunteer to patch this module to use PPI instead...
ACKNOWLEDGEMENTS
To the INTERCAL language, for its endless inspiration.
inc/Module/Install.pm view on Meta::CPAN
@inc::Module::Install::ISA = __PACKAGE__;
sub autoload {
my $self = shift;
my $who = $self->_caller;
my $cwd = Cwd::cwd();
my $sym = "${who}::AUTOLOAD";
$sym->{$cwd} = sub {
my $pwd = Cwd::cwd();
if ( my $code = $sym->{$pwd} ) {
# delegate back to parent dirs
goto &$code unless $cwd eq $pwd;
}
$$sym =~ /([^:]+)$/ or die "Cannot autoload $who - $sym";
unshift @_, ($self, $1);
goto &{$self->can('call')} unless uc($1) eq $1;
};
}
sub import {
my $class = shift;
inc/Test/Builder.pm view on Meta::CPAN
$in_eval = 1 if $sub =~ /^\(eval\)/;
}
$Test->{Test_Died} = 1 unless $in_eval;
};
sub _ending {
my $self = shift;
$self->_sanity_check();
# Don't bother with an ending if this is a forked copy. Only the parent
# should do the ending.
# Exit if plan() was never called. This is so "require Test::Simple"
# doesn't puke.
# Don't do an ending if we bailed out.
if( ($self->{Original_Pid} != $$) or
(!$self->{Have_Plan} && !$self->{Test_Died}) or
$self->{Bailed_Out}
)
{
_my_exit($?);
lib/Acme/ComeFrom.pm view on Meta::CPAN
The C<comefrom-&NAME> form is quite different from the other forms of
C<comefrom>. In fact, it isn't a comefrom in the normal sense at all,
and doesn't have the stigma associated with other C<comefrom>s. Instead,
it installs a post-processing handler for the subroutine, and a jump
would be made just I<after> the subroutine's execution.
=back
If two or more C<comefrom> were applied to the same LABEL, EXPR or NAME,
they will be executed simultaneously via C<fork()>. The forking are
ordered by their occurrances, with the parent process receiving
the last one.
=head1 BUGS
This module does not really parse perl; it guesses label names quite
accurately, but the regex matching the C<comefrom> itself could catch
many false-positives. Perhaps some day a brave soul somewhere will
volunteer to patch this module to use L<PPI> instead...
=head1 ACKNOWLEDGEMENTS
( run in 0.281 second using v1.01-cache-2.11-cpan-4d50c553e7e )