in reply to (tye)Re2: Debugger, use strict, use warnings
in thread Debugger, use strict, use warnings
Perhaps an example would be best.
Suppose that you wanted a version of strict and vars wrapped up in one, takes one argument list and splits it in the obvious way between strict and vars...
Is that what you wanted?package my_strict; use strict; use vars; sub import { shift; # I know my class name I hope my (@vars, @strictures); foreach (@_) { if (/\W/) { push @vars, $_; } else { push @strictures, $_; } } my $pkg = caller; $^H = eval " package $pkg; no strict; use strict qw(@strictures); vars->import(\@vars); \$^H; "; } 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re3: Debugger, use strict, use warnings
by tye (Sage) on Apr 10, 2001 at 22:55 UTC |