No, but for reasons that have nothing to do with Class::Struct, and everything about Perl OO and operator precedence. Since '++' binds more tightly than '->', when you say:
$x->Counter++;
According to B::Deparse, Perl translates that to:
++$x->Counter;
Which should then be tokenized into something like:
(++$x) -> Counter
Which is probably not at all what you want.
Without knowing your specific situation, I would suggest looking more carefully at your object structure. What you're trying to do indicates to me that you're playing too closely to the object's internals.
Update: Forget I said anything. See ikegami's response below.
"There is no shame in being self-taught, only in not trying to learn in the first place." -- Atrus, Myst: The Book of D'ni.
In reply to Re: Class::Struct question
by hardburn
in thread Class::Struct question
by shemp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |