Update to 2.41

This commit is contained in:
Lars Thegler 2004-12-29 21:15:39 +00:00
parent 5fb6bf39ad
commit f423c4a84d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=125467
3 changed files with 43 additions and 40 deletions

View file

@ -5,7 +5,7 @@
# $FreeBSD$ # $FreeBSD$
PORTNAME= Class-DBI-AsForm PORTNAME= Class-DBI-AsForm
PORTVERSION= 2.3 PORTVERSION= 2.41
CATEGORIES= databases perl5 CATEGORIES= databases perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN} MASTER_SITES= ${MASTER_SITE_PERL_CPAN}
MASTER_SITE_SUBDIR= Class MASTER_SITE_SUBDIR= Class

View file

@ -1,2 +1,2 @@
MD5 (Class-DBI-AsForm-2.3.tar.gz) = 158e2f3eb51f10bedbf36e5199802f9a MD5 (Class-DBI-AsForm-2.41.tar.gz) = 123ef74dd79a632b881189334cfa6827
SIZE (Class-DBI-AsForm-2.3.tar.gz) = 3825 SIZE (Class-DBI-AsForm-2.41.tar.gz) = 4104

View file

@ -1,49 +1,52 @@
--- AsForm.pm.orig Sat Apr 3 22:37:32 2004 --- AsForm.pm.orig Mon Dec 27 16:43:44 2004
+++ AsForm.pm Sat Apr 3 22:37:38 2004 +++ AsForm.pm Wed Dec 29 20:31:57 2004
@@ -1,16 +1,14 @@ @@ -1,19 +1,18 @@
package Class::DBI::AsForm; package Class::DBI::AsForm;
-use 5.006; -use 5.006;
use strict; use strict;
-use warnings; -use warnings;
use Class::DBI::Plugin::Type ();
-our $OLD_STYLE = 0;
+use vars qw($OLD_STYLE);$OLD_STYLE = 0;
use base 'Exporter';
use Class::DBI::Plugin::Type ();
use HTML::Element; use HTML::Element;
require Exporter;
-our @ISA = qw(Exporter); -our $OLD_STYLE = 0;
-our @EXPORT = qw( to_cgi to_field _to_textarea _to_textfield _to_select -our @EXPORT = qw( to_cgi to_field _to_textarea _to_textfield _to_select
+use vars qw(@ISA);@ISA = qw(Exporter); +use vars qw($OLD_STYLE @EXPORT $VERSION);
+use vars qw(@EXPORT);@EXPORT = qw( to_cgi to_field _to_textarea _to_textfield _to_select +$OLD_STYLE = 0;
type_of ); +@EXPORT = qw( to_cgi to_field _to_textarea _to_textfield _to_select
-our $VERSION = '2.3'; type_of );
+use vars qw($VERSION);$VERSION = '2.3'; -our $VERSION = '2.41';
+$VERSION = '2.41';
=head1 NAME =head1 NAME
@@ -100,14 +98,14 @@ @@ -106,14 +105,14 @@
sub _to_textarea { my ($self, $col) = @_;
my ($self, $col) = @_; my $a =
my $a = HTML::Element->new("textarea", name => $col); HTML::Element->new("textarea", name => $col, rows => "3", cols => "22");
- if (ref $self) { $a->push_content($self->$col) } - if (ref $self) { $a->push_content($self->$col) }
+ if (ref $self) { $a->push_content($self->$col()) } + if (ref $self) { $a->push_content($self->$col()) }
$OLD_STYLE && return $a->as_HTML; $OLD_STYLE && return $a->as_HTML;
$a; $a;
} }
sub _to_textfield { sub _to_textfield {
my ($self, $col) = @_; my ($self, $col) = @_;
- my $value = ref $self && $self->$col; - my $value = ref $self && $self->$col;
+ my $value = ref $self && $self->$col(); + my $value = ref $self && $self->$col();
my $a = HTML::Element->new("input", type=> "text", name => $col); my $a = HTML::Element->new("input", type => "text", name => $col);
$a->attr("value" => $value) if $value; $a->attr("value" => $value) if $value;
$OLD_STYLE && return $a->as_HTML; $OLD_STYLE && return $a->as_HTML;
@@ -122,7 +120,7 @@ @@ -129,7 +128,7 @@
for (@objs) { my $sel = HTML::Element->new("option", value => $_->id);
my $sel = HTML::Element->new("option", value => $_->id); $sel->attr("selected" => "selected")
$sel->attr("selected" => "selected") if ref $self if ref $self
- and eval { $_->id eq $self->$col->id }; - and eval { $_->id eq $self->$col->id };
+ and eval { $_->id eq $self->$col()->id }; + and eval { $_->id eq $self->$col()->id };
$sel->push_content($_->stringify_self); $sel->push_content($_->stringify_self);
$a->push_content($sel); $a->push_content($sel);
} }