develooper Front page | perl.perl5.porters | Postings from August 2001

Re: 'can' with undefined subs

Thread Previous | Thread Next
From:
Tony Bowden
Date:
August 18, 2001 18:10
Subject:
Re: 'can' with undefined subs
Message ID:
20010819021029.A11802@blackstar.co.uk
On Sat, Aug 18, 2001 at 05:33:01PM +0100, Hugo van der Sanden wrote:
> :My main concern here is that UserA, who uses the module, may not be the
> :same as UserB, who wrote it.
> I think eval is the answer to that one.

I guess so, but it seems quite weird to have to trap "can() I call
this? Yes, sure. OK then call it. Sorry, I guess you can't after all!"

I'll try to come up with a doc patch.

> :Where should the test live?
> I'd guess comp/decl.t and/or comp/proto.t. Be a bit careful though -
> since comp/* tests appear so early in the test suite, it is preferable
> to avoid using complex code.

OK ... I'll have a look at this later tonight.

Thanks,

Tony
-- 
--------------------------------------------------------------------------
 Tony Bowden | tony@tmtm.com | http://www.tmtm.com/
                     If I'm feigning coherence and calmness  Laugh with me
--------------------------------------------------------------------------

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About