On Sun, Aug 06, 2000 at 06:29:46PM -0700, Nathan Wiger wrote:

>    print $pw;

This resulting in a $pw->SCALAR method call is confusing.  $pw is not being
evaluated in scalar context.


>    print $pw;
>    print scalar $pw;
  
These resulting in a $pw->STRINGIFY or $pw->TO_STRING call is also
confusing; neither are being used as strings.


Also, what happens when you assign to a scalar?

    $foo = $pw;

Is $foo now a string, or an object?  Your original RFC dictated it must be
used as "$pw" or "@list_of_pws" to get the special behaviour.

I think it would be neat to have perl call such a method, but I don't think
it should have semantics that are above and beyond what the current use
overload q{""} => \&sub does.  As such, it should be named with something
relating to strings, such as TO_STRING (the typical method name used for
overloading), or STRINGIFY.


Michael
--
Administrator                      www.shoebox.net
Programmer, System Administrator   www.gallanttech.com
--

Reply via email to