Jim:

Thank you very much for looking at this!

Will exporting the function cause prototype checking to be done for all
callers?

I probably wasn't clear in my original posting, the problem I'm having
is that the code sample I gave *does* compile successfully, without
errors. I don't need to export anything to get it to compile
successfully.

I want it to *fail* compilation with an error callout about a parameter
count mismatch.

I haven't tried your suggestion yet, but do you think that what you're
suggesting will cause a compilation error to occur? If so, great, that's
what I'm looking for.

Thanks again for your help,
Gavin


-----Original Message-----
From: Jimmy [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 19, 2006 4:14 PM
To: Gavin Bowlby; beginners@perl.org
Subject: Re: problems with subroutine prototype checking


----- Original Message ----- 
From: "Gavin Bowlby" <[EMAIL PROTECTED]>
To: <beginners@perl.org>
Sent: Friday, January 20, 2006 7:57 AM
Subject: problems with subroutine prototype checking


b.pm:

# You may want to add this :
package b;
require Exporter;
our @ISA = qw/Exporter;
our @EXPORT qw/b_function/;

if you don't add the above, you 'll have to call the sub by :
b::b_function ($var);


      sub b_function ($$$) {

      }

 
1; # Don't forget this at the end of package
or else, the pacakge will fail to use.


HTH,
Jim




--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to