package Foo_parent;
sub new { print "@_\n"; }
package Foo_child;
@{'Foo_child::ISA'} = 'Foo_parent';
package Bar;
my @args = 1 .. 3;
*{'Foo_child::new'} = sub {
my $self = shift;
$self->SUPER::new( @args );
};
package main;
my $foo = Foo_child->new;
####
Foo_child 1 2 3
####
Can't locate object method "new" via package "Bar" at ./foo.pl line 17.