On Sat, Dec 04, 2004 at 04:24:50AM +0000, [EMAIL PROTECTED] wrote:
> If I've understood it correctly, the upshot is that the approach used
> by Spiffy is unworkable without that bug, and will need to be refactored.

Yes, for example even in earlier perl5s such as 5.8.0, @DB::args is very
sensitive to what extra mucking about the parent @_ has received; in the
following, getting arg0 is dependent on not having taken a (temporary)
reference to @_:

    sub super {
        { package DB; my @d = caller(1) } # set @DB::args
        print "arg0 defined\n" if defined $DB::args[0];
    }

    sub f {
        my $self=shift;
        #print [EMAIL PROTECTED], "\n"; # comment out this line and arg0 
becomes defined
        super;
    }

    f('self');

I'd guess the only safe way to do Spiffy would be to get the source filter
to convert

    super;

into

    $self->super(@_);

or similar.


Dave.

-- 
Wesley Crusher gets beaten up by his classmates for being a smarmy git,
and consequently has a go at making some friends of his own age for a
change.
    -- Things That Never Happen in "Star Trek" #18

Reply via email to