Re: Class::DBI 1.00 (almost)

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

From: William Ross
Subject: Re: Class::DBI 1.00 (almost)
Date: 03:55 on 19 Jun 2005
On 18 Jun 2005, at 13:57, Tony Bowden wrote:

> As per my previous threats, I've rolled back all the 'new  
> functionality'
> changes from my current baseline, and plan to release a version 1.00
> which is pretty much 0.96 + a bunch of fixes.

There's still a nasty bug in _extend_meta() that means the meta_info  
hash is shared between all classes if any class-level attribute is  
declared at more than one level in the inheritance tree.

(eg if TEMP columns are declared in the base class as well as in the  
data subclasses)

it's because this:

sub _extend_meta {
     my ($class, $type, $subtype, $val) = @_;
     my %hash = %{ $class->__meta_info || {} };
     $hash{$type}->{$subtype} = $val;
     $class->__meta_info(\%hash);
}

dereferences %hash but not $hash{$type}, and if there have already  
been declarations of that type then a hashref will exist in $hash 
{$type} and subsequently be shared between all the data classes.

The fix is easy:

     my %hash = %{ $class->__meta_info || {} };
     my %subhash = %{ $hash{$type} };
     ...

but I never got round to sending you a patch :(

I'll do it on monday.

thanks for the update.

will



>
> As per my previous threats, I've rolled back all the 'new  
> functionality'
> changes from my current baseline, and plan to release a version 1.00
> which is pretty much 0.96 + a bunch of fixes.
>
> The new functionality which had been applied will be introduced into a
> later version.
>
> I'd be grateful if people could try this version out. It's  
> available at
>   http://www.tmtm.com/CPAN/Class-DBI-0.999.tar.gz
>
> If there are any problems with this, or if there are any bugs that  
> I've
> missed, please let me know ASAP. I'd like to turn this into a 1.0
> release within the week.
>
> The changelog is:
>
>   Bug Fixes
>     - Fixed index to remove object when delete()d (Tim Bunce)
>     - Fixed index to remove object when new relationship added (Tim  
> Bunce)
>     - Fixed bug where PK values got auto-vivified
>       (Tatsuhiko Miyagawa, Christopher L. Everett, Tim Bunce)
>     - Fixed bug where Essential might contain the PK twice
>     - Fixed return code from "unchanged object" updates (Kingsley  
> Kerce)
>     - Fixed update() to die if no rows are changed (Tim Bunce)
>     - Fixed problems with overloaded stringification of related  
> classes
>       (Tim Bunce)
>     - Fixed t/01's check for mutator_name
>     - Fixed strange ordering bug in t/04
>     - Removed 'AS' when aliasing tables; some databases don't like  
> that
>     - Removed hard-coded relationship names for subclassing (Peter  
> Speltz)
>
>   Documentation
>     - Documented $obj->id() in list context (William McKee)
>     - Documented cascading delete for might_have (Tom Hukins)
>     - Documented MCFK better (plus fixed lots of typos etc) (Tom  
> Hukins)
>     - Documented select_val better (Dave Howorth)
>     - Fixed documentation for the year constraint (Andy Lester)
>     - Fixed set_sql documentation to explain when it creates a method
>     - Fixed new_music documentation (Carl Johnstone)
>     - Fixed docs for after_update trigger and update (Kingsley Kerce)
>     - Fixed docs for CD columns to show 'reldate' (Mark Thomas)
>     - Fixed docs for Essential (defaults to Primary, rather than All)
>     - Fixed docs for what gets passed to triggers (Ryan Tate)
>
>   Internals Changes
>     - Added _as_hash() to return underlying data hash
>     - Added test base class: Class::DBI::Test::SQLite
>     - Refactored live_object_key for easier subclassing (Tim Bunce)
>     - Optimised _mk_column_accessors (Maurice Aubrey)
>
>   Deprecations
>     - Removed deprecated method add_hook()
>     - Removed deprecated method associated_class()
>     - Removed deprecated method autocommit()
>     - Removed deprecated method carp()
>     - Removed deprecated method column_type()
>     - Removed deprecated method commit()
>     - Removed deprecated method croak()
>     - Removed deprecated method essential()
>     - Removed deprecated method has_column()
>     - Removed deprecated method hasa()
>     - Removed deprecated method hasa_list()
>     - Removed deprecated method is_column()
>     - Removed deprecated method make_filter()
>     - Removed deprecated method max()
>     - Removed deprecated method min()
>     - Removed deprecated method move()
>     - Removed deprecated method new()
>     - Removed deprecated method normalize()
>     - Removed deprecated method normalize_hash()
>     - Removed deprecated method normalize_one()
>     - Removed deprecated method ordered_search()
>     - Removed deprecated method primary()
>     - Removed deprecated method primary_key()
>     - Removed deprecated method rollback()
>     - Removed deprecated method run_sql()
>     - Removed deprecated method _commit_lin()
>     - Removed deprecated method _commit_vals()
>     - Removed deprecated method _primary()
>     - Removed deprecated method _single_row_select()
>     - Removed deprecated method _single_value_select()
>     - Removed deprecated class data '__hasa_rels'
>
>
> Tony
>
>

(message missing)

Class::DBI 1.00 (almost)
Tony Bowden 12:57 on 18 Jun 2005

Re: Class::DBI 1.00 (almost)
Will Hawes 14:56 on 18 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 15:15 on 18 Jun 2005

Re: Class::DBI 1.00 (almost)
Will Hawes 15:50 on 18 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 18:56 on 18 Jun 2005

Re: Class::DBI 1.00 (almost)
Matt S Trout 16:39 on 18 Jun 2005

Re: Class::DBI 1.00 (almost)
Andy Grundman 16:41 on 18 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 18:58 on 18 Jun 2005

Re: Class::DBI 1.00 (almost)
Peter Speltz 19:34 on 21 Jun 2005

Re: Class::DBI 1.00 (almost)
Tim Bunce 23:17 on 21 Jun 2005

Re: Class::DBI 1.00 (almost)
Peter Speltz 19:28 on 22 Jun 2005

Re: Class::DBI 1.00 (almost)
Tim Bunce 09:24 on 23 Jun 2005

Re: Class::DBI 1.00 (almost)
Tim Bunce 11:44 on 23 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 13:06 on 23 Jun 2005

Re: Class::DBI 1.00 (almost)
Michael Peters 13:49 on 23 Jun 2005

Re: Class::DBI 1.00 (almost)
Peter Speltz 15:24 on 23 Jun 2005

Re: Class::DBI 1.00 (almost)
Peter Speltz 17:48 on 18 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 18:59 on 18 Jun 2005

Re: Class::DBI 1.00 (almost)
Peter Speltz 20:48 on 18 Jun 2005

Re: Class::DBI 1.00 (almost)
Perrin Harkins 18:05 on 18 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 19:04 on 18 Jun 2005

Re: Class::DBI 1.00 (almost)
Perrin Harkins 19:12 on 18 Jun 2005

Re: Class::DBI 1.00 (almost)
Perrin Harkins 02:15 on 19 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 08:07 on 19 Jun 2005

Re: Class::DBI 1.00 (almost)
Michael G Schwern 20:33 on 18 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 22:43 on 18 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 23:14 on 18 Jun 2005

Re: Class::DBI 1.00 (almost)
Rhesa Rozendaal 00:06 on 19 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 08:49 on 19 Jun 2005

Re: Class::DBI 1.00 (almost)
Michael G Schwern 03:22 on 19 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 08:46 on 19 Jun 2005

Re: Class::DBI 1.00 (almost)
Edward J. Sabol 04:49 on 19 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 08:49 on 19 Jun 2005

Re: Class::DBI 1.00 (almost)
William Ross 03:55 on 19 Jun 2005

Re: Class::DBI 1.00 (almost)
William Ross 19:22 on 21 Jun 2005

Re: Class::DBI 1.00 (almost)
Brad Bowman 09:23 on 19 Jun 2005

Re: Class::DBI 1.00 (almost)
Perrin Harkins 13:48 on 19 Jun 2005

Re: Class::DBI 1.00 (almost)
Peter Speltz 14:31 on 19 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 15:25 on 19 Jun 2005

Re: Class::DBI 1.00 (almost)
Edward J. Sabol 18:21 on 19 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 18:38 on 19 Jun 2005

Re: Class::DBI 1.00 (almost)
Perrin Harkins 03:52 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Michael G Schwern 04:16 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Edward J. Sabol 04:21 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Perrin Harkins 04:50 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Edward J. Sabol 04:59 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 08:26 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Edward J. Sabol 16:35 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 16:50 on 20 Jun 2005

Class::DBI 1.00 (almost)
Hartmaier Alexander 10:08 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 10:47 on 20 Jun 2005

->create or ->insert (was: Class::DBI 1.00 (almost))
=?ISO-8859-1?Q?Ask_Bj=F8rn_Hansen?= 20:14 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Perrin Harkins 15:03 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Charles Bailey 15:18 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 15:30 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Charles Bailey 17:28 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Perrin Harkins 18:17 on 20 Jun 2005

Class::DBI 1.00 (almost)
Hartmaier Alexander 11:40 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 12:45 on 20 Jun 2005

Class::DBI 1.00 (almost)
Hartmaier Alexander 13:33 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 13:39 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Michael Peters 13:34 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
William Ross 14:04 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Perrin Harkins 14:27 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Perrin Harkins 14:42 on 20 Jun 2005

Class::DBI 1.00 (almost)
Hartmaier Alexander 14:03 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Cees Hek 14:13 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 14:15 on 20 Jun 2005

Class::DBI 1.00 (almost)
Hartmaier Alexander 14:55 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
merlyn (Randal L. Schwartz) 15:42 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 15:56 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Edward J. Sabol 17:11 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 17:38 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Matt S Trout 18:00 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Edward J. Sabol 18:16 on 20 Jun 2005

Class::DBI 1.00 (almost)
Hartmaier Alexander 17:40 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 08:11 on 24 Jun 2005

Re: Class::DBI 1.00 (almost)
Tim Bunce 10:03 on 24 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 10:23 on 24 Jun 2005

Re: Class::DBI 1.00 (almost)
Tim Bunce 00:08 on 25 Jun 2005

Class::DBI 1.00 (almost)
Hartmaier Alexander 17:45 on 20 Jun 2005

Re: Class::DBI 1.00 (almost)
Andy Grundman 23:49 on 21 Jun 2005

Re: Class::DBI 1.00 (almost)
Hartmaier Alexander 13:26 on 23 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 14:09 on 23 Jun 2005

Re: Class::DBI 1.00 (almost)
Hartmaier Alexander 14:27 on 23 Jun 2005

RE: Class::DBI 1.00 (almost)
Andrew O'Brien 23:12 on 23 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 07:43 on 24 Jun 2005

Re: Class::DBI 1.00 (almost)
=?ISO-8859-1?Q?Ask_Bj=F8rn_Hansen?= 07:48 on 24 Jun 2005

RE: Class::DBI 1.00 (almost)
Andrew O'Brien 07:53 on 24 Jun 2005

Re: Class::DBI 1.00 (almost)
Tony Bowden 08:00 on 24 Jun 2005

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