in reply to Re^2: Catalyst reload, 'use parent' and mro c3
in thread Catalyst reload, 'use parent' and mro c3 (UPD: NOT Catalyst)
just put it somewhere in @INC before the standard one, and let us know if it works :)package parent; use strict; use vars qw($VERSION); $VERSION = '0.232'; sub import { my $class = shift; my $inheritor = caller(0); if ( @_ and $_[0] eq '-norequire' ) { shift @_; } else { for ( my @filename = @_ ) { if ( $_ eq $inheritor ) { warn "Class '$inheritor' tried to inherit from itself\n"; } s{::|'}{/}g; require "$_.pm"; # dies if the file is not found } } { no strict 'refs'; my %ISA = map { $_ => 1 } @{"$inheritor\::ISA"}; for (@_) { push @{"$inheritor\::ISA"}, $_ if not $ISA{$_}; } }; } 1;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^4: Catalyst reload, 'use parent' and mro c3
by vsespb (Chaplain) on Dec 23, 2015 at 20:24 UTC | |
Re^4: Catalyst reload, 'use parent' and mro c3
by Anonymous Monk on Mar 12, 2024 at 12:23 UTC |