Cagao has asked for the wisdom of the Perl Monks concerning the following question:
I have several classes that all have a common attribute, so I've created a Role to define this attribute.
All of these classes also ALL "use" the same batch of modules.
Is there anything wrong with "using" all these modules in my Role so they're all shared? and so neaten up/shorten my code a bit?
Even to the point of putting "use Data::Dumper" in the Role so I know Dumper() is always available.
Cheers
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Moose Role to include Use statements
by tilly (Archbishop) on Feb 21, 2011 at 15:50 UTC | |
by Cagao (Monk) on Feb 21, 2011 at 16:13 UTC | |
by stvn (Monsignor) on Feb 21, 2011 at 18:04 UTC | |
|
Re: Moose Role to include Use statements
by stvn (Monsignor) on Feb 21, 2011 at 18:13 UTC |