自動的にstrictが有効になる理由

1
2
3
use Moose ();
$n = 999;
print $n;
1
2
3
use Moose;
$n = 999;
print $n;
1
2
3
4
Moose does not export its sugar to the 'main' package.
Global symbol "$n" requires explicit package name at D:\WebApp\copal\copal.tmp line 2.
Global symbol "$n" requires explicit package name at D:\WebApp\copal\copal.tmp line 3.
Execution of D:\WebApp\copal\copal.tmp aborted due to compilation errors.

Comments

comments powered by Disqus