On Mon, Jun 23, 2003 at 11:12:59AM -0300, JY - June Young wrote:
> Undefined subroutine &BookReqComObj::BookingRequest called at
>      /APACHE$ROOT/000000/bin/BOOKREQ_COM OBJ.PL line 149 during global
> destruction.
>  
>      The line 149 is
>        my $req = new BookingRequest($items->{$_});
>  
>      The workaround is
>        my $req = BookingRequest->new($items->{$_});
>      and tested OK.
>  
> First I thought it is mod_perl issue, then my colleague told me that
> Perl has always had a problem with creating objects inside of other
> objects. Its a spotty problem.  Sometimes it works sometimes it doesn't.
> She never been able to isolate the actual cause. 

Nothing like that.  The former is called "indirect object syntax" and
sometimes Perl gets confused by it and thinks its something else.
The perlobj man page explains why indirect object syntax can sometimes
be ambiguous.

Personally, I just avoid it entirely and use the latter direct method call
syntax.


-- 
<purl> Hey Schwern! honk, honk, honk, honk, honk, honk, honk, honk,
honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk,
honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk,
honk, honk, honk, honk, honk, honk, honk, honk, honk, honk, honk,
honk, honk, honk, honk, honk, honk, honk, honk, honk, honk!  

Reply via email to