On Tue, 14 Apr 1998 09:17:43 -0400 (EDT), "Fred L. Drake" <[EMAIL PROTECTED]> 
wrote:
>   Could you descibe how get_next_argument() and
> get_next_optional_argument() should be used, and why you think they're 
> better?

In my opinion, get_next_argument should be defined such that one could say:

        $arg = &get_next_argument($_);
or      ($arg,$pat) = &get_next_argument($_);

and get_next_optional_argument should be defined similarly. IMHO, this is
much better because

   1. It is much more intuitive and it is immediately obvious what is
      happening here. Compare this with

          s/$next_pair_rx/$arg=$2;$pat=$&;''/eo;

   2. In the long run it makes it much easier to maintenance l2h. For
      example, suppose we wish to reduce l2h's memory requirements and
      process the input line-by-line. With get_next_argument this would
      simply be a matter of rewriting the subroutine. With the current
      approach one would have to change almost the entire script.

   3. This is how I implemented it in l2h-ng. 8-)

Marcus

Reply via email to