perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From to...@tuxteam.de
Subject Re: Undefined subroutine &main::make_form
Date Mon, 11 Sep 2006 05:22:28 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sun, Sep 10, 2006 at 03:19:57PM -0400, Scott Kaplan wrote:
> In one of my perl scripts, I have the following line:
> 
> use Net::SSLeay qw(post_https make_headers make_form);
> 
> The interpreter accepts the top line just fine...

so Net::SSLeay seems to export the symbol make_form.

> ...but sometime later in
> the script it dies on:
> 
> post_https($host, $port, $script, '',make_form(
> 
> and I get the following error:
> 
> undefined subroutine &main::make_form

Seems your script is importing the SSLeay symbols into the "wrong"
package. This might happen this way:

 | package Foo; # now we are in the package (kind of name space) Foo.
 | ...
 | use Net::SSLeay qw(post_https make_headers make_form); # in Foo
 | ...
 | package main; # back in the default package main
 | 
 | make_form(...) # kaboum!

But... wait a minute: your example would bust on post_https(...) already
(unless you have an alternative post_https(...) defined somewhere,
what's improbable. Do you have another use Net::SSLeay somewhere around?

Of course you might try prefixing make_form, like so:
NET::SSLeay::make_form(...), but I'd be curious as to why the script is
looking for make_form in package main inthe first place.

Regards
- -- tomás
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQFFBPKUBcgs9XrR2kYRArqnAJ0QoCLYcmXgsfOWym+ohqe10ts0aQCfR8nU
cpeGtEf5kIdTSIwJraCToP8=
=4ACB
-----END PGP SIGNATURE-----


Mime
View raw message