]> git.decadent.org.uk Git - maypole.git/commitdiff
Added patch for Maypole::Model::CDBI to avoid clash of _column_info method with Class...
authorBen Hutchings <ben@decadent.org.uk>
Mon, 27 Aug 2007 14:38:10 +0000 (14:38 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Tue, 4 Nov 2008 03:32:55 +0000 (03:32 +0000)
debian/patches/106_fix-_column_info-clash.diff [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/106_fix-_column_info-clash.diff b/debian/patches/106_fix-_column_info-clash.diff
new file mode 100644 (file)
index 0000000..430f254
--- /dev/null
@@ -0,0 +1,65 @@
+--- maypole.orig/lib/Maypole/Model/CDBI.pm
++++ maypole/lib/Maypole/Model/CDBI.pm
+@@ -503,7 +503,7 @@
+ # Thanks to dave baird --  form builder for these private functions
+ # sub _column_info {
+-sub _column_info {
++sub _init_column_info {
+   my $self = shift;
+   my $dbh = $self->db_Main;
+@@ -615,7 +615,7 @@
+ sub column_type {
+   my $class = shift;
+   my $colname = shift or die "Need a column for column_type";
+-  $class->_column_info() unless (ref $class->COLUMN_INFO);
++  $class->_init_column_info() unless (ref $class->COLUMN_INFO);
+   if ($class->_isa_class($colname)) {
+     return $class->_isa_class($colname)->column_type($colname);
+@@ -646,7 +646,7 @@
+ sub required_columns {
+   my ($class, $columns) = @_;
+-  $class->_column_info() unless ref $class->COLUMN_INFO;
++  $class->_init_column_info() unless ref $class->COLUMN_INFO;
+   my $column_info = $class->COLUMN_INFO;
+   if ($columns) {
+@@ -683,7 +683,7 @@
+ sub column_required {
+   my ($class, $colname) = @_;
+   $colname or $class->_croak( "Need a column for column_nullable" );
+-  $class->_column_info() unless ref $class->COLUMN_INFO;
++  $class->_init_column_info() unless ref $class->COLUMN_INFO;
+   if ($class->_isa_class($colname)) {
+     return $class->_isa_class($colname)->column_required($colname);
+   }
+@@ -714,7 +714,7 @@
+     my $class = shift;
+     my $colname = shift or $class->_croak( "Need a column for column_nullable" );
+-  $class->_column_info() unless ref $class->COLUMN_INFO;
++  $class->_init_column_info() unless ref $class->COLUMN_INFO;
+   if ($class->_isa_class($colname)) {
+     return $class->_isa_class($colname)->column_nullable($colname);
+   }
+@@ -737,7 +737,7 @@
+ sub column_default {
+   my $class = shift;
+   my $colname = shift or $class->_croak( "Need a column for column_default");
+-  $class->_column_info() unless (ref $class->COLUMN_INFO);
++  $class->_init_column_info() unless (ref $class->COLUMN_INFO);
+   if ($class->_isa_class($colname)) {
+     return $class->_isa_class($colname)->column_default($colname);
+   }
+@@ -770,7 +770,7 @@
+     $res{moniker}       = $class->moniker;
+     $res{plural}        = $class->plural_moniker;
+     $res{table}         = $class->table;
+-    $res{column_metadata} = (ref $class->COLUMN_INFO) ? $class->COLUMN_INFO : $class->_column_info() ;
++    $res{column_metadata} = (ref $class->COLUMN_INFO) ? $class->COLUMN_INFO : $class->_init_column_info() ;
+     return \%res;
+ }
index 0f93769674c8dbf6e65ec50c011f077c4e891cc1..bac8b0ae8d309b83e5cf3ab5617fd7eac71b86fd 100644 (file)
@@ -3,4 +3,5 @@
 103_fix-view_object-warning.diff
 104_add-cgi-error-status.diff
 105_dont-use-warn-method.diff
+106_fix-_column_info-clash.diff
 201_no-file-mmagic-xs.diff