X-Git-Url: https://git.decadent.org.uk/gitweb/?p=maypole.git;a=blobdiff_plain;f=lib%2FMaypole%2FModel%2FCDBI%2FAsForm.pm;h=48894f9534b7a8b726da80a21bde9b813624cd7b;hp=e0499c6ae50fb574c007e76882b37cebeab35d08;hb=1f6513b996a1327e839df5d5583f724ce34a2b3e;hpb=70a0d09c3f228f792775b4ac03894d0d37b5c444 diff --git a/lib/Maypole/Model/CDBI/AsForm.pm b/lib/Maypole/Model/CDBI/AsForm.pm index e0499c6..48894f9 100644 --- a/lib/Maypole/Model/CDBI/AsForm.pm +++ b/lib/Maypole/Model/CDBI/AsForm.pm @@ -717,10 +717,6 @@ sub _to_textfield { sub _to_select { my ($self, $col, $args) = @_; - warn "\n---\n[_to_select] col : $col\n"; - warn "[_to_select] self : $self\n"; - warn "[_to_select] args : ",Dumper($args), "\n"; - warn "[_to_select] caller : ",caller(),"\n"; $args ||= {}; # Do we have items already ? Go no further. @@ -804,12 +800,7 @@ sub _to_select { $args->{items} = \@objs; } else { $args->{items} = $items; - } - - use Data::Dumper; - warn "Just got items. They are " . Dumper($args->{items}); - - warn "col : $col\n"; + } # Make select HTML element $a = $self->_select_guts($col, $args); @@ -1201,28 +1192,23 @@ sub _select_guts { } # Single Hash elsif ($type eq 'HASH') { - warn "making select of single hash"; $a->push_content($self->_options_from_hash($items, $args)); } # Single Array elsif ( $type eq 'ARRAY' and not ref $items->[0] ) { - warn "making select of single array"; $a->push_content($self->_options_from_array($items, $args)); } # Array of Objects elsif ( $type eq 'ARRAY' and $proto !~ /ARRAY|HASH/i ) { # make select of objects - warn "making select of objects\n"; $a->push_content($self->_options_from_objects($items, $args)); } # Array of Arrays elsif ( $type eq 'ARRAY' and $proto eq 'ARRAY' ) { - warn "making select of array of arrays\n"; $a->push_content($self->_options_from_arrays($items, $args)); } # Array of Hashes elsif ( $type eq 'ARRAY' and $proto eq 'HASH' ) { - warn "making select of array of \n"; $a->push_content($self->_options_from_hashes($items, $args)); } else { die "You passed a weird type of data structure to me. Here it is: " . @@ -1247,11 +1233,6 @@ sub _options_from_objects { my $selected = $args->{selected} || {}; my $stringify = $args->{stringify} || $self->stringify_column; - warn "self : $self\n"; - warn "stringify : $stringify\n"; - warn "stringify column : ", $self->stringify_column, "\n"; - warn "stringify in args : ", $args->{stringify}, "\n"; - my @res; for (@$items) { my $id = $_->id; @@ -1326,7 +1307,6 @@ sub _options_from_hash { sub _options_from_hashes { my ($self, $items, $args) = @_; - warn "_options_from_hashes called with $self,", Dumper($items), Dumper($args), "\n"; my $selected = $args->{selected} || {}; my $pk = eval {$args->{class}->primary_column} || 'id'; my $fclass = $args->{class} || '';