0.05 Jan 27th 2014
- Updated dist build to distzilla
+ - fixed https://rt.cpan.org/Ticket/Display.html?id=93432
TODO: fix issue 74086
TODO: fix issue 80705
0.04 Jan 27th 2009
[MetaYAML]
[MakeMaker]
[Manifest]
+[TestRelease]
+[ConfirmRelease]
+[UploadToCPAN]
[PruneCruft]
[PruneFiles]
[Prereqs / TestRequires]
Test::More = 0
DBICx::TestDatabase = 0
+
my $values = $info->{extra}->{list};
my %values = map {$_=>1} @{$values};
-
- if ( defined($info->{default_value}) && !exists $values{$info->{default_value}}) {
- push(@{$values},$info->{default_value});
- $values->{$info->{default_value}} = 1;
- }
-
+
+ push(@{$values},$info->{default_value})
+ if defined($info->{default_value})
+ && !exists $values{$info->{default_value}};
+
$self->inflate_column(
$column => {
inflate => sub {
--- /dev/null
+package TestDB::WithBadDefaultValue;
+
+use strict;
+use warnings;
+
+use base 'DBIx::Class';
+
+__PACKAGE__->load_components(qw/
+ InflateColumn::Object::Enum
+ PK::Auto
+ Core
+/);
+__PACKAGE__->table('withbaddefaultvalue');
+__PACKAGE__->add_columns(
+ id => {
+ data_type => 'number',
+ is_auto_increment => 1,
+ is_nullable => 0
+ },
+ enum => {
+ data_type => 'varchar',
+ is_enum => 1,
+ is_nullable => 0,
+ default_value => 'badvalue',
+ extra => {
+ list => [qw/red green blue/]
+ },
+ }
+);
+__PACKAGE__->set_primary_key('id');
+
+1;
+
--- /dev/null
+package main;
+
+use Test::More 'no_plan';
+
+BEGIN {
+ use lib 't/lib';
+ use_ok 'DBICx::TestDatabase';
+ use_ok 'TestDB';
+}
+
+my $db = DBICx::TestDatabase->new('TestDB');
+
+isa_ok $db, 'TestDB';
+
+my $rs = $db->resultset('WithBadDefaultValue')
+ ->create({id => 1});
+
+ok defined($rs) && $rs, 'got a resultset'
+ or diag "ResultSet: $rs";
+
+diag $rs->enum;
+
+1; # end of test
+