It has nothing to do with lvalue functions. The same problem occurs if it's not an lvalue function.
Perl thinks you are using the ?...? operator (Look under "Quote and Quote-like Operators"). Omitting parens is dangerous.
Change
( META_HIDDEN ? "/.$newname." : "/$newname." )
to
( META_HIDDEN() ? "/.$newname." : "/$newname." )
or to
( (META_HIDDEN) ? "/.$newname." : "/$newname." )
In reply to Re: funky error using lvalue subs in ternary assignment?
by ikegami
in thread funky error using lvalue subs in ternary assignment?
by leocharre
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |