jonswar / perl-mason

Mason 2
58 stars 20 forks source link

Added the "class_header" attribute to the "new" constructor #14

Closed jomo666 closed 12 years ago

jomo666 commented 12 years ago

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.