develooper Front page | perl.perl5.porters | Postings from November 2021

Re: A 'permanent' keyword

Thread Previous | Thread Next
November 12, 2021 09:35
Re: A 'permanent' keyword
Message ID:
On Fri, 12 Nov 2021 at 04:19, Leon Timmermans <> wrote:

> Ultimately, state is equivalent to "a my variable outside the current sub"
> and permanent is equivalent to "a my outside the outermost sub" (or a state
> inside the outermost sub). They're both useful concepts, but they can also
> both already be expressed in the traditional ways.

I think the first quoted part in your first sentence would be a super
helpful addition to the docs. Personally I can't stand state variables as I
am never 100% sure how they behave compared to simple my declarations where
the rules are simple enough I can be confident I remember them.

Anyway, better docs on state would be nice.


perl -Mre=debug -e "/just|another|perl|hacker/"

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