2000-08-09-17:33:25 Steve Simmons:
> If that's the intent, then yes, author name must become part of the
> package identifier.  Rather than change the meaning of "ref $object"
> unexpectedly, I'd add one or more alternate forms of ref.  Off the
> top of the head, something like
> 
>     ( $version, $class ) = vref $object;  # ref with version
>     ( $author, $class ) = aref $object;   # ref with author
>     ( $version, $author, $class ) = fref $object;   # get all

Rather than proliferating the number of keywords eaten with all
these *ref varients, this sounds like a useful place for returning
an object with a default stringification of the class:

        $class = ref $object; # when you use $class as a string,
                              # or 2nd arg to bless()
        $version = $class->{VERSION};
        $author = $class->{AUTHOR};

Ref RFC 37, RFC 73.

-Bennett

PGP signature

Reply via email to