Cees Hek wrote:
> On 7/15/05, Michael Peters <[EMAIL PROTECTED]> wrote:
>
>> my $error_page = $self->check_rm(...);
>> if( $error_page ) {
>> return $error_page;
>> } else {
>> my $email = $self->dfv->valid('email');
>> }
>>
>>Which seems very readable to me.
>
>
> I don't want to join the debate on whether this is a good idea or not,
> but I would rather see the above structure in reverse:
>
> my $valid = $self->check_rm(...) or return $self->dfv->error_page;
I actually like this idea the best of all. I know it would be more work
for mark, but maybe $self->dfv could be just a placeholder object that
gives access to both the error_page and results (D::FV::R). If we are
concerned with backwards compatability then maybe just introduce a new
method, etc.
if( $self->valid_rm(...) ) {
my $valid = $self->dfv->results->valid();
} else {
return $self->error_page;
}
Or if it get's confusing cause some stuff is under ->dfv() and other
stuff isn't...
if( $self->dfv->valid(...) )
Just some ideas and ramblings...
--
Michael Peters
Developer
Plus Three, LP
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/[email protected]/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]