Changeset 32399

Show
Ignore:
Timestamp:
04/14/09 19:28:05 (4 years ago)
Author:
yappo
Message:

certainly get_table_attributes hook works

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Data-Model/trunk/lib/Data/Model/Schema/SQL.pm

    r30155 r32399  
    123123sub as_table_attributes { 
    124124    my $self = shift; 
    125     return '' unless ref($self->{schema}->options->{create_sql_attributes}) eq 'HASH'; 
    126     my($ret) = $self->call_method( 'get_table_attributes', $self->{schema}->options->{create_sql_attributes} ); 
     125    my $hash = $self->{schema}->options->{create_sql_attributes}; 
     126    $hash = +{} unless ref($hash) eq 'HASH'; 
     127    my($ret) = $self->call_method( 'get_table_attributes', $hash ); 
    127128    $ret ? " $ret" : ''; 
    128129}