From: Rafael Garcia-Suarez Date: Sat, 16 Aug 2003 19:54:43 +0000 (+0000) Subject: Avoid a "Subroutine Cwd::fastcwd redefined" warning when X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=46ba315504111fc499d30433580e2435f4bb5639;p=p5sagit%2Fp5-mst-13.2.git Avoid a "Subroutine Cwd::fastcwd redefined" warning when loading Cwd. Undefing &Cwd::fastcwd beforehand is inconvenient because loading the XS part of Cwd might fail. p4raw-id: //depot/perl@20736 --- diff --git a/lib/Cwd.pm b/lib/Cwd.pm index 2b5f85e..305cc60 100644 --- a/lib/Cwd.pm +++ b/lib/Cwd.pm @@ -167,7 +167,7 @@ if ($^O eq 'os2' && defined &sys_cwd && defined &sys_abspath) { eval { require XSLoader; - no warnings 'redefine'; + local $^W = 0; XSLoader::load('Cwd'); };