Now here we have to be careful not to mix display and business logic... this might be fine for now, but lateron if we want different UI's to the same business logic, eg. FTP service instead of web service, the send_error_page would have to be less UI-specific.if ($email->check_validity() == $EMAIL_DUPLICATE) { send_error_page(message => 'that e-mail is already in use'); }
But the focus is on clarifying the API of the email validation function, and I think the example is illuminating for that purpose.
Carter's compass: I know I'm on the right track when by deleting something, I'm adding functionality
In reply to Re: Re: Re: How to return errors from my object oriented subroutine
by princepawn
in thread How to return errors from my object oriented subroutine
by princepawn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |