Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Tie::Static take 2

by petral (Curate)
on Jul 16, 2001 at 08:50 UTC ( [id://96957]=note: print w/replies, xml ) Need Help??


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. :-)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://96957]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (4)
As of 2024-04-23 19:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found