First, how do I silence this warning during -c?Just turn off that type of warnings for the given scope e.g
Or just mention it again in some way (according to perldiag).{ no warnings 'once'; *import = coderef(); }
Second, why does it let me refer to *import without declaring it first or qualifying it when use strict is in effect?Because strict doesn't deal with globs. I think it's assumed if you're messing with globs you probably (and hopefully) know what you're doing.
_________
broquaint
In reply to Re: 'used once' during perl -c
by broquaint
in thread 'used once' during perl -c
by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |