Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: martin [...] hybyte.com
Cc:
AdminCc:

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



Subject: primary key does not get in essential, if essential used in base class
using perl 5.8.1 on freebsd 4.8 Class::DBI 0.94 the followin line of perl perl -wle 'package p::x; use base qw/Class::DBI/; p::x->columns(Essential => "ab"); ' -e ' package p::y; use base qw/p::x/; p::y->columns(Primary => "pp");' -e ' package main; print "Primary ",join(", ",p::y->columns("Primary")); print "Essential ",join(", ",p::y->columns("Essential"));' The primary key will not be included in the "Essential" list. It will if Essential was not used in the base class. it will also if u define another set of essential fields in p::y (but then you loose the info from the base class, unless you take care of including the SUPER::columns("Essential") (works without SUPER:: too))
It is also not possible to add columns to a group defined in a base class: package p::x; use base qw/Class::DBI/; p::x->columns(some => "ab"); package p::y; use base qw/p::x/; p::y->columns(some => "pp"); package main; print join(", ", p::y->columns("some")); # prints only "pp" there is no documentation, which behaviour is expected.
It is also not possible to add columns to a group defined in a base class: package p::x; use base qw/Class::DBI/; p::x->columns(some => "ab"); package p::y; use base qw/p::x/; p::y->columns(some => "pp"); package main; print join(", ", p::y->columns("some")); # prints only "pp" there is no documentation, which behaviour is expected.