in reply to Re^6: Why should I use perl 5.10?
in thread Why should I use perl 5.10?

it is strange that the environment influences how do I speak:

I guess it's analogous to to getting an echo when conversing in a canyon :)

Alternatively, you could make the case that a module doesn't speak for it's author, but rather acts on behalf of the application author that uses it.

But, I do get what you mean. In the docs for 5.10 I just read about the new lexical $_ that locally overrides the global of the same name. It struck me that it would be nice if a similar arrangement was possible for many/most of the special globals, but on a package by package basis.

Eg. If I declare and set a $/ at the top level of my package, then whenever the global of that name would be used, the local package instance (if it exists) would be used in preference to the global.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^8: Why should I use perl 5.10?
by blazar (Canon) on Dec 02, 2007 at 16:54 UTC
    But, I do get what you mean. In the docs for 5.10 I just read about the new lexical $_ that locally overrides the global of the same name.

    I personally believe that I can now say() it: I've been waiting for this for quite a lot of time:

    C:\temp>cat 510.pl #!/usr/bin/perl use 5.010; use strict; use warnings; my @x=1..3; say for map { sub {$_} } @x; say for map { my $n=$_; sub {$n} } @x; { my $_; say for map { sub {$_} } @x; } __END__ C:\temp>\programmi\perl510\bin\perl 510.pl CODE(0x184fcbc) CODE(0x184fcbc) CODE(0x184fcbc) CODE(0x229dbc) CODE(0x229e6c) CODE(0x182a2fc) CODE(0x229dbc) CODE(0x182a0cc) CODE(0x182a14c)

    Update: I also notice in the delta manpage the remark that "substr() lvalues are no longer fixed-length." I believe it was you who talked (to me) about substr() lvalues in the first place, and about the fixed length limitation.

      I believe it was you who talked (to me) about substr() lvalues in the first place, and about the fixed length limitation.

      Yes. Though it was turning up the link to it on your home page that led me back to it when I just went looking :)

      Now I should be able to go back and revisit the code I was working on when I made the discovery of the limitation...if my push down stack of current stuff ever permits it.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.