in reply to Re^6: Is there a wantobject like wantarray?
in thread Is there a wantobject like wantarray?

Sorry my question was not well phrased.

Maybe better "involves possibility" or "allows".

The point about a "want context" is to return the right data type.

Returning an object could be a work around, if it transforms into the right data type after first access.

Otherwise there would be a performance penalty for simple scalars.

But not sure if unblessing or untying within an accessor is a reliable approach with calculated risk.

Cheers Rolf

(addicted to the Perl Programming Language and ☆☆☆☆ :)

  • Comment on Re^7: Is there a wantobject like wantarray?