in reply to It's one of the reasons I wrote vars::i
in thread Foo is not a Bar, why?
use strict; package Foo; use isa qw(Bar); sub new { bless {},shift }
The module isa.pm can actually quite short:
Et voilà:# file isa.pm package isa; sub import { my $pkg = shift; my $caller = caller; no strict 'vars'; push @{"$caller\::ISA"}, @_; } 42;
foo is a Bar
Of course, with base doing the same and more, I don't know if there's much need for this here module.
|
|---|