Thread OOP $self (11 answers)
Opened by KurtZ at 2008-04-30 18:42

KurtZ
 2008-04-30 20:53
#109056 #109056
User since
2007-12-13
411 Artikel
BenutzerIn
[default_avatar]
ich versuche gerade abzuschätzen wie performant der CPAN:self code ist ... kennt sich jemand mit CPAN:DB aus, das sieht doch nach overhead aus... die Notwendigkeit erschließt sich mir auch nicht.

Code (perl): (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
sub _args {
    my $level = 2;
    my @c = ();
    while ( !defined($c[3]) || $c[3] eq '(eval)') {
        @c = do {
            package DB;
            @DB::args = ();
            caller($level);
        };
        $level++;
    }
    return @DB::args;
}


NACHTRAG: habs begriffen, danke!
TMTOWTDYOG (there's more than one way to dig your own grave)

View full thread OOP $self