[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

Re: [PATCH English.pm] Removing the regex nastiness (finally)



At 18.05 +0000 2000.01.21, Hugo wrote:
>In <20000121120125.A27231@athens.aocn.com>, Michael G Schwern writes:
>:$MATCH, et al are exported as trick tie'd variables.  On their first
>:use they replace themselves with their actual intended values.  Passes
>:all t/lib/english.t tests.

You rule.  PowerBooks ARE good for something, whaddya know?


>Dunno how relevant this is - English isn't something I'm in the habit
>of using - but as far as I can see, existing code such as:
>
>  use English;
>  @MATCH = qw/ win draw lose /;
>  ...
>
>would have worked up to now, but with your patch applied the *MATCH
>glob is modified later, so would destroy the array. I think you can
>avoid that by changing the glob replacement in STORE to replace only
>the scalar within the glob.

Yeah:

-	*{$caller.'::'.$$self} = *{$Evil_Vars{$$self}};
+	*{$caller.'::'.$$self} = *{$Evil_Vars{$$self}}{SCALAR};

But wouldn't this be a problem for any of those?

  BEGIN { @ORS = 0..9; print @ORS }  # perhaps in some other module?
  use English;
  print @ORS;

Perhaps English.pm should be modified appropriately for all cases?

-- 
Chris Nandor          mailto:pudge@pobox.com         http://pudge.net/
%PGPKey = ('B76E72AD', [1024, '0824090B CE73CA10  1FF77F13 8180B6B6'])


Follow-Ups from:
Michael G Schwern <schwern@pobox.com>
References to:
Hugo <hv@crypt.compulink.co.uk>

[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]