Re: [CDBI] Odd behaviour under RedHat vs Debian

Mike Whitaker <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.class-dbi
Message-ID <[email protected]>
> Well. I found it. If someone can explain why it works under 3.0.14  
> and fails under 3.0.16, that would be shiny:

...

> I've been overriding accessor names with:
>
> sub accessor_name
> {
>     my ($class, $column) = @_;
>     $column =~ s/_id$//;
>     return $column;
> }
>
> which basically strips trailing '_id' off any accessor name, so  
> that for example $class->player will work just as well as $class- 
> >player_id
>
> Which is all fine and shiny. Except that the table referenced by  
> MCD::SQL::PointAward has a column called table_id...

accessor_name() was, of course, deprecated in 3.0.15. The code that  
goes ahead and calls it anyway, with a warning, doesn't quite behave  
the same as in 3.0.14.
-- 
Mike Whitaker - [email protected]
Tel: +44 (0) 20 7501 1920 - Mob: +44 (0) 7971 977375
Skype: FleetfootMike; AIM: FleetfootMike
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.