Hello Monks,
I made an AIM bot running on Mac OS X, using the Net::AIM module. The bot receives commands, which mostly involve reading and writing a database (with DBI), though sometimes a command will have it read a local file, or read and parse a web page. Everything works, but there is an oddball thing I can't figure out how to debug. If I use open() to open a file, or a pipe to a command, and then explicitly close() the handle, then suddenly I cannot send messages via AIM. Clients show the bot as on-line, it hears messages, and it logs that sends messages, but the messages go nowhere. If I use open() but never explicitly close() anything, then everything works (this is what I am doing now), but I get this bad feeling in the pit of my stomach, and the fact that something somewhere is wrong is bugging me. I have tried different filehandle names, thinking that this might be a namespace related thing, but that made no difference. I am still running the default version of Perl that came with Mac OS X. Does anyone have any pointers as to what I could do to try to debug this? I am using strict, and warnings, but that does not seem relevant for this oddball issue. I tried stepping through it in the debugger, but I could not really figure out what I was looking for.
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.