On Thu, Jun 26, 2003 at 05:21:27PM -0500, Ken Williams wrote:
> On Thursday, June 26, 2003, at 02:37 PM, Steve Grazzini wrote:
> >
> > use Regexp::Capture;
> > use strict;
> >
> > while (<>) {
> > use capture;
>
> That seems a little strange to me -
You're right... and deep-down I knew it was a bad idea.
> doesn't it require a capture.pm module? Could it be turned on & off
> by an exported Regexp::Capture function? Or maybe "use Regexp::Capture
> qw(lexicals);"?
I put a fake entry in %INC, as Darren has guessed, so there's no
capture.pm file. Or rather: we ignore the possibility of somebody
writing capture.pm. :-)
Since it has compile-time effects, this needs to be "use something"
instead of a function call -- and I wanted it to be something lowercase
to match 'strict', 'integer', etc.
> Regexp::NamedCapture would be a little more explicit.
Quite a bit more explicit, actually. Just "Capture" misses the point.
Thanks!
--
Steve