/public_html/---+
| |
| |
| calling.cgi
|
|
/applications/---+
|
|
Main.pm
|
Common.pm
|
/Contact/--+
|
|
Contact.pm
####
#!/usr/local/bin/perl
use lib "/usr/home/bradcathey/applications/";
use strict;
use Contact::Contact;
print "done
";
##
##
#!/usr/bin/perl
use strict;
use Common;
#usually CGI::Application, plug-ins, HTML::Template, etc.
print "Content-type: text/html\n\n";
print "main.pm
";
1;
##
##
package Common;
use strict;
use Exporter 'import';
@EXPORT = qw( show_here );
sub show_here {
print "common.pm
";
return "thanks for contacting us";
}
1;
##
##
package Main::Contact;
use base qw( Main );
use Common; #why?
use strict;
print "contact.pm
";
my $msg = show_here();
print $msg."
";
return 1;
##
##
main.pm
contact.pm
common.pm
thanks for contacting us
done