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.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|