Skip Menu |

This queue is for tickets about the Class-DBI-AsForm CPAN distribution.

Report information
The Basics
Id: 21656
Status: new
Priority: 0/
Queue: Class-DBI-AsForm

People
Owner: Nobody in particular
Requestors: anchi.chen [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: to_field() - $class instead of $self?
Date: Mon, 25 Sep 2006 16:00:59 +1000
To: bug-Class-DBI-AsForm [...] rt.cpan.org
From: "An Chi Chen" <anchi.chen [...] gmail.com>
Hi, Could you kindly clarify the following for me please? Should the RETURN statement inside the IF statement read *"return $self->$meth($field); "* instead of *"return $class->$meth($field);" *? *That is:* sub to_field { my ($self, $field, $how) = @_; my $class = ref $self || $self; if ($how and $how =~ /^(text(area|field)|select)$/) { no strict 'refs'; my $meth = "_to_$how"; #============================================================ * return $class->$meth($field); # <------ should be $self instead of $class? * #============================================================ } ... ... } Thank you An Chi