[Catalyst] trouble with LocationMatch
Dave Howorth
dhoworth at mrc-lmb.cam.ac.uk
Mon Oct 30 10:33:54 GMT 2006
Hironori Yoshida wrote:
> - $base_path = $location;
> + $self->apache->path_info =~ m/$location/msx;
> + $base_path = $&; # I know this is the match-vars
Programming Perl, Third Edition
24.2.1. Time Efficiency
Avoid $& and its two buddies, $` and $'. Any occurrence in your program
causes all matches to save the searched string for possible future
reference. (However, once you've blown it, it doesn't hurt to have more
of them.)
Cheers, Dave
More information about the Catalyst
mailing list