Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

Ovid (2709)

Ovid
  (email not shown publicly)
http://publius-ovidius.livejournal.com/
AOL IM: ovidperl (Add Buddy, Send Message)

Stuff with the Perl Foundation. A couple of patches in the Perl core. A few CPAN modules. That about sums it up.

Journal of Ovid (2709)

Tuesday September 28, 2004
03:23 PM

Evil Source Filter Bugs

[ #21096 ]

It's a long story, but the difficult-to-find bug that I mentioned earlier was caused by a source filter that created a forward sub declaration for a sub that had been commented out. This breaks inheritance:

#!/usr/local/bin/perl
package ClassA;
sub new { bless {}, shift }
sub test { 'ClassA::test' }

package ClassB;
@ClassB::ISA = 'ClassA';
sub test;

package main;
use Test::More 'no_plan';

ok(!defined *ClassB::new{CODE},
    '&Class::new is not defined because it is inherited');
ok(defined *ClassB::test{CODE},
    '&ClassB::test should be defined because there is a prototype');
is(ClassB->new->test, 'ClassA::test',
    '... but this test says it is not');

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.