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
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
-apply_to( $obj )? (Score:1)
Reply to This
Re: (Score:1)
Devel::EnforceEncapsulation->apply_to($pkg);
my $obj = $pkg->new();
Devel::EnforceEncapsulation->remove_from($pkg);
The instance keeps the overload, but subsequent instantiations are not affected. The only downside to that approach is that it might blow away any deref overloads that may exist in $pkg. But that's a pretty small hazard.
Re: (Score:1)
Re: (Score:1)