Acme-AtIncPolice

 view release on metacpan or  search on metacpan

lib/Acme/AtIncPolice.pm  view on Meta::CPAN

            my($f, $l) = (caller($_))[1, 2];
            next unless $f and $l;

            push @filename, $f;
            push @line, $l;

        }

        my $location = @line == 1 ? " at $filename[0] line $line[0]." :
                                    join "\n", map " at $filename[$_] line $line[$_].", (0 .. $#filename);
        my($_p, $p) = ($self, $self->parent);
        while($p){
            my $s_type = ref $p->{storage};
            my $s = $p->{storage};
            if($s_type eq 'HASH'){
                push @msg, "{$_p->{__key}}";
            }elsif($s_type eq 'ARRAY'){
                push @msg, "[$_p->{__point}]";
            }
            $_p = $p;
            last if ! ref $p or ! ($p = $p->parent);
        }
        $msg = @msg > 0 ? ' => ' . join "", reverse @msg : "";


        $value = '' unless defined $value;
        if ($class eq 'Scalar') {
            return("${msg} => $value$location");
        } elsif ($class eq 'Array') {
            unless(defined $args->{point}){
                $msg =~ s/^( => )(.+)$/$1\@\{$2\}/;



( run in 0.294 second using v1.01-cache-2.11-cpan-4d50c553e7e )