dpmott has asked for the wisdom of the Perl Monks concerning the following question:
I couldn't get rid of the warning generated from that line of code, so I went with this:# issues "Ambiguous use of X resolved to Y" warning that # I don't know how to turn off, these don't work: # $SIG{__WARN__} = sub{} # $^W = 0 # no strict 'refs' my $old_scan_podpath = *{Pod::Html::scan_podpath}{CODE};
That seems to work.# issues "Subroutine X redefined at Y" warning, but # I can turn that one off with $^W local( $^W ) = 0; # Needed because I'm using a symbolic ref now. no strict 'refs'; my $old_scan_podpath = *{'Pod::Html::scan_podpath'}{CODE};
And yes, I'm aware of a few wrap modules out there, but for some reason I didn't want to add more dependencies to this script than I already have. Besides, it seemed like a good opportunity for me to learn how to do this.local(*Pod::Html::scan_podpath) = sub { # do stuff here # call the old implementation &$old_scan_podpath; # uses @_ };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Ambiguous use of X resolved to Y
by chromatic (Archbishop) on Feb 05, 2004 at 23:28 UTC | |
|
Re: Ambiguous use of X resolved to Y
by diotalevi (Canon) on Feb 05, 2004 at 23:30 UTC | |
by dpmott (Scribe) on Feb 05, 2004 at 23:43 UTC | |
by diotalevi (Canon) on Feb 05, 2004 at 23:54 UTC |