in reply to Re^2: object swizzling?
in thread object swizzling?
In the lazy-load case I want to ensure that the real object is loaded before forwarding, so it's not that simple.You can call the super class's constructor first:
And then store it, or use it, or rebless it, or whatever.package 'Bar'; use base 'Foo'; sub new { my $class = shift; my $parent_class_object = SUPER->new(); ... }
|
|---|