I don't see it on CPAN yet, but gave a quick look at the package from the link above. Quickly, I see you have use strict commented out.. why? You later have no strict 'refs'. Also, please do not put anything on the CPAN which has your email address as a default value. You should not make people set (or unset) default values within the module, ie:
my $def_smtp = "your.smtp.com"; #<--IMPORTANT! Set this!
my $def_email = 'thomasoniii@yahoo.com';
my $def_return = 'thomasoniii@yahoo.com';
my $def_subject = "Ye Gods! An error!";
my $def_domain = "smtp.com"; #<--IMPORTANT! Set this! I
+ mean it!
my $def_log_file = "error.log";
These things should be done ONLY by passing a hash (I would use a hash) when use'ing the module (or in a new() method, which you don't need to have), or with methods (like Carp::Notify::set_smtp('smtp.me.com'), or Carp::Notify::set_defaults({smtp => 'me.smtp.com', email => 'foo@me.com'}), etc...).
Please change this.
my $paddr = sockaddr_in(25, $remote_address);
How do you know it is 25?
sub today {
...
}
I like POSIX for things like this, some don't.
sub error { undef};
I would have finished this sub before putting on CPAN, personally. You could $Carp::Notify::errlog = 'file' or STDERR (etc...), if Win32 you could log to the Event Log, or make error() a callback to a user defined sub to handle the errors as they wish.
Just some comments from a quick review.
Cheers,
KM
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.