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

Re: 'can' with undefined subs

Thread Previous | Thread Next
Tony Bowden
August 18, 2001 18:10
Re: 'can' with undefined subs
Message ID:
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.


 Tony Bowden | |
                     If I'm feigning coherence and calmness  Laugh with me

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About