Re: Comments on bugs marked bogus
| From: | Ian Eure | Date: | Tue, 26 Jul 2005 21:01:02 +0000 |
| Subject: | Re: Comments on bugs marked bogus | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-38943@lists.php.net to get a copy of this message | ||
On Tuesday 26 July 2005 12:31 pm, Lukas Smith wrote:
> Alexey Borzov wrote:
> > BTW, the most obvious problem with brain-dead __autoload()
> > implementation described by Scott in the bug report is the following.
> > Consider: some package author would like to check for PEAR errors, but
> > save the overhead of loading PEAR.php when there is no error, so he
> > writes: if (is_a($returnValue, 'PEAR_Error')) {
> > ...
> > }
>
> indeed its pretty stupid that is_a() and a few other functions trigger
> __autoload() (maybe __autoload() should atleast pass on the context in
> which it was triggered and let the user bail out safely if its in a non
> fatal is_a() kind of situation ..?).
>
> beyond that tip-toeing around a PEAR.php include is stupid imho. we have
> removed the main stumbling blocks that were causing performance
> degration and i would be a happy camper if people would go back to the
> good old practice of extending PEAR_Error for their packages to make
> proper error handling possible.
>
> that being said we could easily break out PEAR_Error into its own file
> and simply include it from PEAR.php to solve the particular problem.
>
I'd like to see this. I can submit a patch, if you like.
Attachment: [application/pgp-signature]
Attachment: [application/pgp-signature]