Patrick R. Michaud wrote:
On Tue, Oct 02, 2007 at 07:19:30AM -0700, jerry gay wrote:
On 10/2/07, Klaas-Jan Stol <[EMAIL PROTECTED]> wrote:
[...]
but that fails with "Class 'STMQueue' doesn't exist"
[...]
since the pdd isn't clear on the return value from get_class when a
class isn't found, i'll leave the decision to allison, but i'd prefer
a PMCNULL be returned instead of an exception.

Works for me, that's what the internal code was doing already. Changed in the pdd15oo branch r21759, with the return value noted in PDD 15. (It also shortens the implementation of the 'get_class' opcode down to 2 lines of code, which is nice.)

    $P0 = get_class 'STMQueue'     # or ['STMQueue']
    unless null $P0 goto done
    class = newclass 'STMQueue'    # or ['STMQueue']

Is now the correct idiom to use for checking if a class exists.

Allison

Reply via email to