use Module::ScanDeps;
use strict;
use warnings;
my $hash_ref = scan_deps(
files => [ 'c:\lib-authtest.cgi' ],
recurse => 1,
);
my $key;
my $value;
print "start:";
while (($key, $value) = each(%{$hash_ref})) {
print $key.", ".$value."
";
}
####
#!/usr/bin/perl
use warnings;
use strict;
#perl2exe_noopt "Opcode.pm"
#perl2exe_exclude "Apache2/RequestRec.pm"
#perl2exe_exclude "Apache2/RequestIO.pm"
#perl2exe_exclude "Apache2/RequestUtil.pm"
#perl2exe_exclude "APR/Pool.pm"
#perl2exe_exclude "ModPerl/Util.pm"
#perl2exe_exclude "Apache2/Response.pm"
#Net::SMTP related:
#perl2exe_exclude "Convert/EBCDIC.pm"
#perl2exe_exclude "Mac/InternetConfig.pm"
#xperl2exe_include "Authen/SASL.pm"
use CGI::Carp qw(fatalsToBrowser);
&Main;
exit;
############################################
sub Main {
print "Content-type: text/html;charset=UTF-8\n\n";
print <
Library Search
NCP
use Net::SMTP;
use MIME::Base64;
use Authen::SASL;
my $SMTPServer = 'myserver.net';
my $emailFrom = 'from@isp.com';
my $emailTo = 'to@isp.com';
my $NetSMTP = Net::SMTP->new($SMTPServer, Timeout=>60, Debug=>1) || die "Unable to open connection to SMTP server named '$SMTPServer'.\nError Message: $! \n";
my $user = 'user';
my $pass = 'pass';
print "
SMTP auth";
$NetSMTP->auth( $user, $pass ) || die "
Auth didn't work: $!
";
print "
sending from [$emailFrom] to [$emailTo]";
$NetSMTP->mail($emailFrom);
$NetSMTP->to($emailTo);
$NetSMTP->data();
$NetSMTP->datasend('this is the body text');
$NetSMTP->quit;
print "
Done.";
}