is there a way to suppress this warning from inside testpackage.pm somehow?
I've tried a bunch of things and still haven't found a solution.
Is this not possible to do in per?
Or is it so obvious I can't see it?
Greg
package file testpackage.pm:
package testpackage;
use warnings;
use
You can add some no-op-ish noise to sidestep the warning e.g;
local $main::tricky;
or
use vars '$main::tricky';
___
Boston-pm mailing list
Boston-pm@mail.pm.org
http://mail.pm.org/mailman/listinfo/boston-pm
Design issues aside,
no warnings 'once';
Sent from my iPhone
On May 4, 2013, at 3:47 PM, Greg London em...@greglondon.com wrote:
is there a way to suppress this warning from inside testpackage.pm somehow?
I've tried a bunch of things and still haven't found a solution.
Is this not
On 04/05/2013 20:47, Greg London wrote:
is there a way to suppress this warning from inside testpackage.pm somehow?
...
#!/usr/bin/env perl
use warnings;
use strict;
use testpackage;
somesub('tricky');
print hello, tricky is '$main::tricky'\n;
When I run this script, I get the warning:
Name
This pragma usage is lexically scoped, too.
Sent from my iPhone
On May 4, 2013, at 5:01 PM, Jordan Adler jordan.m.ad...@gmail.com wrote:
Design issues aside,
no warnings 'once';
Sent from my iPhone
On May 4, 2013, at 3:47 PM, Greg London em...@greglondon.com wrote:
is there a way
If your module has an import method, and in that method calls
warnings-unimport(once) then the unimport should be lexically
scoped to where your package was used. Which in the normal case is
the whole file, so it works.
On Sat, May 4, 2013 at 2:07 PM, Jordan Adler jordan.m.ad...@gmail.com wrote: