On 19 Aug 2009, at 15:35, Matt Koscica wrote:
On Wed, Aug 19, 2009 at 9:44 PM, Eden Cardim <[email protected]>
wrote:
Why did you feel that quoting Eden's entire post, including signature
was a good idea? Bottom posting and including the _ENTIRE_ message is
even worse that top posing IMO, as it forces the reader to scroll
past the message _they just read already_...
Also FYI it's pretty easy to do something on startup, inside MyApp.pm:
sub run {
my $c = shift;
$c->do_stuff();
$c->SUPER(@_);
}
Nooo! NEVER, EVER CALL ->SUPER in a Catalyst application, it will do
the wrong thing as Catalyst relies on multiple inheritance, and SUPER
is likely to call the wrong thing.
You should be using ->next::method.
Also, even that is fairly fugly - I'd highly recommend using Moose's
method modifiers, so you can write:
before run => sub {
my $c = shift;
# Do stuff
};
instead - no method redispatch to cock up the arguments on..
Cheers
t0m
_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/