Skip Menu | will be shut down on March 1st, 2021.

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

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

Owner: Nobody in particular
Requestors: adamlounds [...]

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

Subject: Documentation error re:accessor_name_for()
Date: Wed, 14 Mar 2007 16:30:46 +0000
To: bug-Class-DBI [...]
From: adam <adamlounds [...]>
Download (untitled) / with headers
text/plain 813b The example code in the pod is sub accessor_name_for { my ($class, $column) = @_; $column =~ s/^customer//; return $column; } But accessor_name_for is passed a DBI::Class::Column object, which stringifies to it name, not its accessor. If you override the column using your own Class::DBI::Column (as documented in the section immediately above this code), it doesn't work - the accessor method isn't created (one is created for $column->name, but not one for $column->accessor) The example code should be something like sub accessor_name_for { my ($class, $column) = @_; my $accessor = $column->accessor; $accessor =~ s/^customer//; return $accessor; } Thanks, -- Adam

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to