Jess Balint wrote:
> 
> Hello all, I was wonder if there is a way to do this with less `$query->`'s.
> And yes, I know the table's not perfect. Any input would be appreciated.
> Thanks.
> 
> ~Jess
> 
>         print   $query->start_form,
>                 $query->start_table({-border=>undef}),
>                 $query->Tr({-align=>CENTER,-valign=>CENTER}),
>                 $query->td(["Username: "]),
> ...

If you want to use OO-way still, there's a funny trick to short your
source-code:

for ($query) {
        print   $_->startform,
                $_->start_table({-border => undef}),
                $_->Tr({-align=>CENTER,-valign=>CENTER}),
                $_->td(["Username: "]),
                ...
}

A second way (not so funny :-( ) is to use run time code evaluation:

my @queries = qw/
        start_form,
        start_table({-border=>undef}),
        Tr({-align=>CENTER,-valign=>CENTER}),
        td(["Username:\ "]),
        ...
/;

eval "print " . join(",", map( {'$query->' . $_}, @queries )) . ';';


Best Wishes,
Andrea

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to