Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 3.135.247.237
Web Server : Apache/2.4.62 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.18
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /usr/share/perl5/Class/C3/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/perl5/Class/C3/next.pm
package  # hide me from PAUSE
    next;

use strict;
use warnings;
no warnings 'redefine'; # for 00load.t w/ core support

use Scalar::Util 'blessed';

our $VERSION = '0.35';

our %METHOD_CACHE;

sub method {
    my $self     = $_[0];
    my $class    = blessed($self) || $self;
    my $indirect = caller() =~ /^(?:next|maybe::next)$/;
    my $level = $indirect ? 2 : 1;

    my ($method_caller, $label, @label);
    while ($method_caller = (caller($level++))[3]) {
      @label = (split '::', $method_caller);
      $label = pop @label;
      last unless
        $label eq '(eval)' ||
        $label eq '__ANON__';
    }

    my $method;

    my $caller   = join '::' => @label;

    $method = $METHOD_CACHE{"$class|$caller|$label"} ||= do {

        my @MRO = Class::C3::calculateMRO($class);

        my $current;
        while ($current = shift @MRO) {
            last if $caller eq $current;
        }

        no strict 'refs';
        my $found;
        foreach my $class (@MRO) {
            next if (defined $Class::C3::MRO{$class} &&
                     defined $Class::C3::MRO{$class}{methods}{$label});
            last if (defined ($found = *{$class . '::' . $label}{CODE}));
        }

        $found;
    };

    return $method if $indirect;

    die "No next::method '$label' found for $self" if !$method;

    goto &{$method};
}

sub can { method($_[0]) }

package  # hide me from PAUSE
    maybe::next;

use strict;
use warnings;
no warnings 'redefine'; # for 00load.t w/ core support

our $VERSION = '0.35';

sub method { (next::method($_[0]) || return)->(@_) }

1;

__END__

=pod

=head1 NAME

Class::C3::next - Pure-perl next::method and friends

=head1 DESCRIPTION

This module is used internally by L<Class::C3> when
necessary, and shouldn't be used (or required in
distribution dependencies) directly.  It
defines C<next::method>, C<next::can>, and
C<maybe::next::method> in pure perl.

=head1 AUTHOR

Stevan Little, <stevan@iinteractive.com>

Brandon L. Black, <blblack@gmail.com>

=head1 COPYRIGHT AND LICENSE

Copyright 2005, 2006 by Infinity Interactive, Inc.

L<http://www.iinteractive.com>

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.

=cut

Anon7 - 2022
AnonSec Team