Re: [Templates] hash.keys not working on blessed hash?

[prev] [thread] [next] [Date index for 2004/12/15]

From: C. Chad Wallace
Subject: Re: [Templates] hash.keys not working on blessed hash?
Date: 18:03 on 15 Dec 2004
Simon Wistow wrote:
[...]
> package UNIVERSAL;
> 
> sub keys {
>     my $self = shift;
>     return unless ref $self;

return unless ref $self && $self->isa( 'HASH' );

...otherwise, the next line is going to die on any object reference that 
isn't a hash.

>     return keys %{$self};
> }

_______________________________________________
templates mailing list
templates@xxxxxxxxxxxxxxxx.xxx
http://lists.template-toolkit.org/mailman/listinfo/templates

[Templates] hash.keys not working on blessed hash?
Thomas, Mark - BLS CTR 13:57 on 15 Dec 2004

RE: [Templates] hash.keys not working on blessed hash?
Thomas, Mark - BLS CTR 17:06 on 15 Dec 2004

Re: [Templates] hash.keys not working on blessed hash?
C. Chad Wallace 18:03 on 15 Dec 2004

Generated at 08:56 on 15 Mar 2005 by mariachi v0.52