--- Piers Cawley <[EMAIL PROTECTED]> wrote:
>
> How about:
>
> my method SCALAR::attributes($self:) { $$self }
> my method HASH::attributes(%self:) { %self.kv }
> my method ARRAY::attributes(@self:) { [EMAIL PROTECTED] }
>
> method _attributes($attrs) {
> my @attributes = $attrs.attributes
> return @attributes[0] if @attributes == 1;
> ...
> }
>
> Assuming it's legal.
Just saw this. Sorry for the late reply.
At first that gave me the willies, then I noticed the "my" on the
front. I assume because of the "my" on there that this would affect
those data types only locally? That seems like it would be a nice
compromise.
Is this legal syntax?
Cheers,
Ovid
--
If this message is a response to a question on a mailing list, please send
follow up questions to the list.
Web Programming with Perl -- http://users.easystreet.com/ovid/cgi_course/