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

Re: 'can' with undefined subs

Thread Previous | Thread Next
Hugo van der Sanden
August 18, 2001 09:34
Re: 'can' with undefined subs
Message ID:
Tony Bowden <> wrote:
:> I think that's really down to the user not to declare a sub without
:> providing an implementation - "Undefined subroutine &Foo::bar called"
:> is about as helpful as we can be at that point.
: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.

:> :It also doesn't seem to be documented anywhere.
:> Patches welcome, as always. You may well find that we are deficient
:> on tests for this behaviour as well. :)
:I'll try to find the best place to document it. Suggestions welcome.
: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.


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