in reply to Re^3: Declaring with my, assigning, and testing in same line (attributes)
in thread Declaring with my, assigning, and testing in same line
At second thought this is a too limited technique... consider
while(1) { my $x :check = some_call(); }
The check would be done only once, so in this case I'd clearly prefer a functional approach
while(1) { check {RULE} my $x = some_call(); }
Using attributes is a pretty way to apply ties, but most use cases I can think of combining this with untie are limited to debugging.
> > > And for completeness , I'm sure you could also use variable :attributes for such checks.
Wrong I was, young padawan. ;-)
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Declaring with my, assigning, and testing in same line (attributes)
by choroba (Cardinal) on Dec 13, 2015 at 17:50 UTC | |
by LanX (Saint) on Dec 13, 2015 at 19:39 UTC | |
by choroba (Cardinal) on Dec 15, 2015 at 09:44 UTC | |
by LanX (Saint) on Dec 15, 2015 at 10:23 UTC |