In my particular case this trick will not mess a program, because I use it inside AUTOLOAD so coderefs should not pass through.
But...let's see, you can call
Accidentally, it still not pass through as in that AUTOLOAD I see:$Tcl::Tk::Widget::AUTOLOAD=sub{print 'tricky hacky sub'}; Tcl::Tk::Widget::AUTOLOAD($object)
But I get your point: I should closer revise that module for similar things.my $method = $Tcl::Tk::Widget::AUTOLOAD; # Separate method to autoload from (sub)package $method =~ s/^(Tcl::Tk::Widget::((MainWindow|$ptk_w_names)::)?)// or die "weird inheritance ($method)";
Also, in my case, in Tcl::Tk module AUTOLOAD is used to redirect a method to Tcl/Tk system, so it is not OO trick but rather some kind of redirecting methods to Tcl/Tk.
PS. I was talking about Tcl::Tk as I do not have anything other resembling OO
In reply to Re^3: $object->UnrelatedPackage::some_subroutine()
by Courage
in thread $object->UnrelatedPackage::some_subroutine()
by Thilosophy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |