in reply to Tie::Static take 2
in thread Tie::Static

why can't
(static my $x) = 'yz';
work. You have to get the parens right. But at least it's useful.
update Nevermind. you'd have to back into the unless defined $x bag all over again. (static my $x ) ||=  ?

  p

Replies are listed 'Best First'.
Re (tilly) 2: Tie::Static take 2
by tilly (Archbishop) on Jul 16, 2001 at 09:07 UTC
    Actually I had simpler reasons for avoiding that.

    The first is that I didn't want to depend on experimental 5.6 features without good reason.

    The second, and more important, is that I tried to figure out what it would look like to declare and initialize a list of things that included arrays and hashes. It did not look pretty.

    Anyways I think that the API that I came up with is both simple to explain and pretty flexible. Plus it works on 5.005. :-)