in reply to Re^2: Code Loop?
in thread Code Loop?
You could poison them with a tie to catch uses at runtime:
package Tie::Poison; sub TIESCALAR { ... } sub TIEARRAY { ... } sub FETCH { my $var = tied $_[0]; die "Prohibited variable '$$var' used"; } package unusual_variable_names; our @unusual = qw( @@ @$ ... ); sub unimport { for my $name (@unusual) { no strict 'refs'; tie @{ $name }, 'Tie::Poison', $name; }; }; ... package main; no unusual_variable_names;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Code Loop?
by LanX (Saint) on Aug 08, 2018 at 14:42 UTC |