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

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

From: Dylan Hardison
Subject: Re: [Templates] hash.keys not working on blessed hash?
Date: 16:35 on 15 Dec 2004
On Wed, 15 Dec 2004 08:57:01 -0500, Thomas, Mark - BLS CTR
<Thomas.Mark@xxx.xxx> wrote:
>
> It looks like foo.keys returns nothing if foo is blessed into a class. Is
> there a workaround for this? Thanks.
>
> - Mark.

yes, have the class implement this method:

sub keys {
  my $self = shift;
  return [ keys %$self ];
}

(d'oh, did "reply" instead of "reply all" again.)

_______________________________________________
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?
Dylan Hardison 16:35 on 15 Dec 2004

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

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