[Catalyst] Overriding uri_for() -- sane? better way

Matt S Trout dbix-class at trout.me.uk
Sun Jan 15 23:22:47 CET 2006


On Sun, Jan 15, 2006 at 01:53:34PM -0800, apv wrote:
> On Sunday, January 15, 2006, at 01:42  PM, Matt S Trout wrote:
> >Why not just add a uri_for method to MyApp?
> >
> >sub uri_for {
> >  my $self = shift;
> >  my $uri = $self->NEXT::uri_for(@_);
> >  $uri =~ s{/index.(?:fcgi|pl)}{};
> >  $uri;
> >}
> 
> Why not? Because I are too dumb. Thanks! I promise to read the full
> NEXT related docs before asking any more questions today.

Well, in this case SUPER would probably have worked just fine too :P

-- 
     Matt S Trout       Offering custom development, consultancy and support
  Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

 + Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Catalyst mailing list