in reply to An Interesting Gotcha With use/require
Subroutine fileparse_set_fstype redefined at C:/Program Files/Perl/lib/File/Basename.pm line 152 (#1) (W redefine) You redefined a subroutine. To suppress this warning +, say { no warnings; eval "sub name { ... }"; }
Out of interest, does anyone know why the error message suggests wrapping "sub name { ... }" in an eval?
...prints 'y' with no warnings for me.use strict; use warnings; sub foo { print 'x' } { no warnings; sub foo { print 'y' } } foo();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: An Interesting Gotcha With use/require
by lestrrat (Deacon) on Feb 10, 2005 at 06:37 UTC |