Sorry for typing err for the sub name at the question part =(
normal_header() and other_header() should aling with the
sample code, so is NormalHeader() and OtherHeader().


----- Original Message ----- 
From: "Jimmy" <[EMAIL PROTECTED]>
To: "Perl Beginners" <beginners@perl.org>
Sent: Monday, January 23, 2006 8:17 PM
Subject: Want to add exception for a auto run sub in module


Hi all,

I have a module somewhat looks like this :

  package minicgi;
  require Exporter;  our @ISA = qw/Exporter/;
  our @EXPORT = qw/NormalHeader OtherHeader/;

  sub NornalHeader { print "Content-Type:text/html\n\n" } # normal html
  sub OtherHeader { print "Content-Type:$_[0]\r\n\r\n" } # perhaps sending
file

   NormalHeader;
  1;


So, when I use minicgi, normal_header() will autorun, however,
it makes the other_header() meaningless. So my question is,
is there anyway I'll run normal_header() without specific argument,
but don't run it if I pass whatever argument on the 'use' statement ?

Thank you very much,
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