CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Perl Programming Help: Intermediate: Re: [wickedxter] Mail::Sender v0.8.2 throws error in debug mode only: Edit Log



FishMonger
Veteran / Moderator

Jul 20, 2014, 8:57 AM


Views: 3735
Re: [wickedxter] Mail::Sender v0.8.2 throws error in debug mode only


In Reply To

Code
open my $DEBUG, ">> /path/to/debug/file.txt" 
or die "Can't open the debug file: $!\n"
$sender = new Mail::Sender ({
...
debug => $DEBUG,
});


its looks like the $DEBUG need to be a file glob ref for debug to work as in the pod for the module.

you just have a file name.


You forgot to include the text describing the usage of the debug parameter, which says you can pass a filename.


Quote
debug

=> "/path/to/debug/file.txt"

or

=> \*FILEHANDLE

or

=> $FH

All the conversation with the server will be logged to that file or handle. All lines in the file should end with CRLF (the Windows and Internet format). If even a single one of them does not, please let me know!

If you pass the path to the log file, Mail::Sender will overwrite it. If you want to append to the file, you have to open it yourself and pass the filehandle:


To bulrush:
If the error only show up when you enable debug on the object, then I'd say the module may have a bug. I see that the author uploaded a new version ( 0.8.23 ) on the 15th. Start by upgrading to that version and pass a filehandle instead of just the filename to rule out an issue with the module opening the filehandle. If you still have the same problem, then contact the author and/or submit a bug report.


(This post was edited by FishMonger on Jul 20, 2014, 9:04 AM)


Edit Log:
Post edited by FishMonger (Veteran) on Jul 20, 2014, 8:59 AM
Post edited by FishMonger (Veteran) on Jul 20, 2014, 9:00 AM
Post edited by FishMonger (Veteran) on Jul 20, 2014, 9:04 AM


Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives