Thread HTC und Loops in Loops
(10 answers)
Opened by MartinR at 2007-07-23 13:22
Ersetze in Tabulate.pm die Subs max_columns und min_columns durch:
Code (perl): (dl
)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 sub max_columns{ my ($self,$value) = @_; $self->{max_cols} = $value if defined $value and $value =~ /^[1-9]\d*$/; my $caller = (caller(1))[3]; unless( ($caller and $caller =~ /min_columns/) or not defined $self->min_columns){ $self->min_columns($self->{max_cols}) if $self->{max_cols} < $self->min_columns; } return $self->{max_cols}; } =head2 min_columns set how many columns the table can have (at least). $tabulator->min_columns(3); the table has at least three columns =cut sub min_columns{ my ($self,$value) = @_; $self->{min_cols} = $value if defined $value and $value =~ /^[1-9]\d*$/; my $caller = (caller(1))[3]; unless( $caller and $caller =~ /max_columns/){ $self->max_columns($self->{min_cols}) if $self->{min_cols} > $self->max_columns; } return $self->{min_cols}; } <!--EDIT|renee|1185193609--> OTRS-Erweiterungen (http://feature-addons.de/)
Frankfurt Perlmongers (http://frankfurt.pm/) -- Unterlagen OTRS-Workshop 2012: http://otrs.perl-services.de/workshop.html Perl-Entwicklung: http://perl-services.de/ |