On Wed, Jan 24, 2018 at 4:18 PM, James E Keenan via RT < perlbug-followup@perl.org> wrote: > On Wed, 24 Jan 2018 17:38:14 GMT, grinnz@gmail.com wrote: > > > > > > > > That should be reasonable, but note that not many modules implement > > unimport; 'no warnings' is probably the most common usage of 'no'. > > > > -Dan > > There are many instances of the 'no' function in the source code, but very > few instances of the string 'no if'. See attachment for output of 'ack > '\bno\s+if\b' .'. Almost every instance is testing one of Perl's special > variables against some value and, as you say, most are warnings-related. > > Unfortunately that isn't getting us any close to solving the problem. Is > anyone familiar with where/how 'no' is implemented in the source code? > > 'no' is the same as 'use' but it calls unimport instead of import. The complications just come from modules not generally implementing an unimport method that mirrors the import (mostly because unimporting functions doesn't really make practical sense). So only pragmas that create lexical effects tend to use it. -DanThread Previous | Thread Next