Dmitri wrote:
Is there a clean way to share data from class in a role?
If it was an object method I would probably set up attribute for that,
but it's a class method.
package FN::Utils;
use Moose::Role;
# class method
sub some_db_op {
need $TABLE from consuming class here
}
package FN::U
like that were to be added, I might call it
ensure_roles_applied().
--
Todd Hepler
Informatics -- LIMS
Dan Harbin wrote:
The following:
#!/usr/bin/env perl
use strict;
use warnings;
package MyClass;
{
use Moose;
sub hello_class {
my $class = shift;
return "Hello $class\n";
}
}
print "1: ", MyClass->hello_class(), "\n";
my $myc
Jonathan Swartz wrote:
>
> package My::Person;
> use My::Moose;# automatically sets superclass to
> My::Moose::Object, instead of Moose::Object
I have wanted something similar, and ended up with this:
package My::Moose;
sub import {
my $caller = caller();
eval qq{
pac