develooper Front page | perl.perl5.porters | Postings from September 2011

Re: Perl 5.16 and Beyond.

Thread Previous | Thread Next
Johan Vromans
September 13, 2011 11:33
Re: Perl 5.16 and Beyond.
Message ID:
Abigail <> writes:

> Here's an even simpler example:
>     use 5.18;

It would be nice if this would work as of 5.16...
(Note the absence of a smiley.)

> Normally, I would document that as "mylc returns the lowercase of its
> argument".

That would be:

  sub mylc { lc $_[0] }


  use v5.18;
  sub mylc { lc $_[0] }

> But that should now be documented as "mylc returns the 5.18 lowercase
> version of its argument".

Because you *explicitly* require the v5.18 semantics.

More contrived:

  sub mylc { lc $_[0] }

  { use v5.16;
    sub mylc_5016 { lc $_[0] }
  { use v5.18;
    sub mylc_5018 { lc $_[0] }

Actually, I see more significant problems with Perl trying to carry all
old semantics into all new versions. You cannot simpy make a small
change to a built-in, you have to make a backup copy and keep it just in
case. This is a potential maintenance nightmare.

-- Johan

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About