The problem will come as soon as you have more than one instance of your object. They will both overwrite the $self in global scope.
If you only have one object, a Singleton, then it makes (some) sense to do that, but I would use MooseX::Singleton to implement that directly.
In reply to Re: Why not use a local variable for $self in Moose?
by Corion
in thread Why not use a local variable for $self in Moose?
by nysus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |