Re: Trivial Question

[prev] [thread] [next] [Date index for 2005/06/11]

From: Tony Bowden
Subject: Re: Trivial Question
Date: 21:49 on 11 Jun 2005
On Sat, Jun 11, 2005 at 01:32:16PM -0700, Michael G Schwern wrote:
> I would presume the result of $obj->gimme_hash would be equivalent to:
> 	my %hash;
> 	foreach my $col ($obj->columns) {
> 		$hash{$col} = $obj->$col();
> 	}
> No?

Well, in the general case there's all sorts of issues here with inflated
columns, triggers, even overriden methods.

In general, however, it's probably OK.

copy() does it as:

        my %data;
        my @columns = $self->all_columns;
        @data{@columns} = $self->get(@columns);

Tony

(message missing)

Trivial Question
David Christensen 01:36 on 11 Jun 2005

Re: Trivial Question
Cees Hek 01:56 on 11 Jun 2005

Re: Trivial Question
David Christensen 12:58 on 11 Jun 2005

Re: Trivial Question
Tony Bowden 07:30 on 11 Jun 2005

Re: Trivial Question
Michael G Schwern 20:32 on 11 Jun 2005

Re: Trivial Question
Tony Bowden 21:49 on 11 Jun 2005

Re: Trivial Question
Michael G Schwern 00:15 on 12 Jun 2005

Re: Trivial Question
Emanuele Zeppieri 08:27 on 12 Jun 2005

Relationship question.
Rod Za 18:15 on 13 Jun 2005

Re: Relationship question.
Matt S Trout 02:07 on 14 Jun 2005

Re: Relationship question.
Aaron Trevena 08:41 on 14 Jun 2005

Re: Relationship question.
Rod Za 16:25 on 14 Jun 2005

Generated at 16:37 on 28 Jul 2005 by mariachi v0.52