[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: basic mp questions


I think you're a bit confused here. Are you writing C programs or Perl programs? There's an API to mod_perl for C programs and an API to mod_perl for Perl programs.

The whole point of use MIME::Base64 (); in startup.pl is so as NOT to import everything from a particular package.

The point of use MIME::Base64 qw/encode_base64/; in your package is just to import that particular routine into your namespace.

I hope this helps. There is a good book written at the time of MP1 called Writing Apcahe Modules with Perl and C which may help you (and is largely relevant for MP2)

Another place for you to read is www.modperlbook.org

I hope this helps.

lists user <suppressed> wrote:
Hello,

I'm reading the documents about modperl and C API for Apache.I have
several questions again,thanks for any helps in advance.

1) what're the advantage of C modules than modperl modules?and what're
the advantage of modperl modules than C's?

2) Where in startup.pl,I wrote,

#startup.pl
use MIME::Base64 ();

then in Mymodule.pm,I wrote,

#Mymodule.pm
use MIME::Base64 qw/encode_base64/;

------
from the documents I know that in Mymodule MIME::Base64 won't be
loaded again since it's already loaded by startup.pl (modperl checks
the %INC and know it's already there).
But,why the function of encode_base64() can be successfully loaded
since the loading action doesn't happen in Mymodule?As you see,in
startup.pl I don't load that function encode_base64().

Thanks!



Disclaimer: Technically, I'm always wrong!!

Inbox cluttering up with junk? Clean up with Yahoo! Mail.


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.