CGI-Log

 view release on metacpan or  search on metacpan

Log.pm  view on Meta::CPAN

##   - the output moves from the top down to the caller.. (i.e. starts at "main") 
##
##
##
{
        my($self) = @_;

	## CGI::Log->_find_self(\$self);		## we have "found outselves" (what object
							## reference we are, by the time we get here.)

        my @call = caller(1);
        my $line = $call[2];
        my $cnt = 2;

        my @stack;

        while (defined($call[0]))
        {
                my $caller = $call[0];
                @call = caller($cnt);
                $call[3] = $caller if (!defined($call[3]));
                unshift(@stack, $call[3] . ":" . $line);
                $line = $call[2];
                $cnt++;
        }
        return("[" . join(" ", @stack) . "]");
}

##################################################
##



( run in 0.733 second using v1.01-cache-2.11-cpan-5f2e87ce722 )