in reply to Attempt to copy freed scalar and return value semantics

The most obvious possibility is context. If you assign the method to $rv, it forces scalar context, while if you return it directly, it has whatever context the method was called in, which could be list or void context. We'd have to see the calling statement to be sure.

Update: See http://community.activestate.com/node/8760.

stephen

  • Comment on Re: Attempt to copy freed scalar and return value semantics