jonswar/perl-mason — pull request #14 by jomo666 (2012-07-05 12:33:11+00:00)
Title: Added the "class_header" attribute to the "new" constructor

Hi,

now it is easy to adding class_headers into every mobj files without the need of overwriting Mason::Compilation.pm, so now is possible to write:

my $mason = Mason->new(
comp_root => '.',
data_dir => '/tmp/xxx',
class_header => qq(
use Foo;
use Bar;
),
);

Of course, for some more advanced features the user still can overwrite the "output_class_header" method.