Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Greetings. I am trying to figure out how to override 'use'.
However, this didn't seem to work. I tried enclosing the enclosing the 'subs' pragma and the fake 'use' definition in a BEGIN block because the 'use' occurs at compile time. Alas, this didn't seem to work.BEGIN{ use subs qw(use); sub use{ print "Using fake use\n"; } } use Data::Dumper;
Thus I have come to you seeking enlightenment. I am going about this wrong? Is it even possible to override the 'use' special form? Is their documentation anywhere specifying what CORE subroutines are and are not overridable?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Overriding 'use'?
by Zaxo (Archbishop) on Sep 12, 2005 at 06:52 UTC | |
Re: Overriding 'use'?
by rinceWind (Monsignor) on Sep 12, 2005 at 10:51 UTC | |
by xdg (Monsignor) on Sep 12, 2005 at 11:26 UTC |
Back to
Seekers of Perl Wisdom