in reply to funky error using lvalue subs in ternary assignment?
Another way to make your original code work is to include an empty prototype in the sub definitions. That makes perl take the barewords as functions without argument while compiling. I imagine that is a side effect of constant folding.
my $META_HIDDEN = 1; sub META_HIDDEN () : lvalue { $META_HIDDEN } my $META_EXT = 'meta'; sub META_EXT () : lvalue { $META_EXT } my $to = $self->abs_loc . ( META_HIDDEN ? "/.$newname." : "/$newname." ) . META_EXT;
After Compline,
Zaxo
|
|---|