develooper Front page | perl.perl5.porters | Postings from January 2012

[perl #2743] perl -MO status

From:
Father Chrysostomos via RT
Date:
January 11, 2012 13:17
Subject:
[perl #2743] perl -MO status
Message ID:
rt-3.6.HEAD-14510-1326316626-1111.2743-15-0@perl.org
On Tue Mar 28 03:39:03 2000, tchrist@chthon.perl.com wrote:
> I'm going through 5.6's perlcompile and trying all the examples,
> and many/most of them always/often have serious/fatal difficulties
> ranging from incorrect/spurious output to completely blowing up.
> 
> Does this stuff have an owner?
> 
> 1)  With Deparse, virtually anything nontrivial gets me
> 
>     Can't call method "sibling" on an undefined value at
> lib/B/Deparse.pm line 257.
>     CHECK failed--call queue aborted.

Robin Houston did a lot of work on B::Deparse before 5.8, so I’m going
to assume this is fixed, as I’ve never run into such problems.

> 
> 2) Before Deprase dies, you often get a lot of these:
> 
>     Exiting subroutine via next at /opt/perl/5.005.6.0/lib/5.6.0/i686-
> linux/B/Deparse.pm lin
>     e 257.
>     Exiting subroutine via next at /opt/perl/5.005.6.0/lib/5.6.0/i686-
> linux/B/Deparse.pm lin
>     e 257.
> 
> 3) From Lint you can get this:
> 
>     Undefined value assigned to typeglob at lib/B/Lint.pm line 291.

$ perl5.8.8 -MO=Lint -we 'BEGIN { $::{""}=undef }'
Undefined value assigned to typeglob at
/usr/local/lib/perl5/5.8.8/darwin-thread-multi-2level/B/Lint.pm line 322.
-e syntax OK
$ perl5.8.9 -MO=Lint -we 'BEGIN { $::{""}=undef }'
-e syntax OK


> 4)   And with Xref, this simple thing:
> 
>     sub start {
>        my($self, $tag, $attr, $attrseq, $orig) = @_;
>        if ($tag eq 'a' && exists $attr->{href}) {
> 	   if ($attr->{href} =~ s/\Q$from/$to/g) {
> 	       # must reconstruct the start tag based on $tag and $attr.
> 	       # wish we instead were told the extent of the 'href' value
> 	       # in $orig.
> 	       my $tmp = "<$tag";
> 	       for (@$attrseq) {
> 		   my $encoded = encode_entities($attr->{$_});
> 		   $tmp .= qq( $_="$encoded ");
> 	       }
> 	       $tmp .= ">";
> 	       $self->output($tmp);
> 	       return;
> 	   }
>        }
>        $self->output($orig);
>     }
> 
> Produces this with Xref:
> 
>     Package (lexical)
>       $attr             i2, 3
>       $attrseq          i2, 9
>       $encoded          i10, 11
>       $orig             i2, &18, 18
>       $self             i2, 14, 18
>       $tag              i2, 3, 8
>       $tmp              i8, &14, 11, 13, 14
>       %$attr            3, 4
>       %%$attr           4, 10
>       %%%$attr          10
>       @$attrseq         9
> 
> This %%%%% business is getting out of hand.

Same in 5.15.6.

-- 

Father Chrysostomos


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=2743



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About