Thanks for the constructive criticism
tilly. I really appreciate it. That's the kind of advise I was looking for when I wrote this node. I'm still new to OO programming, so I'm expecting to get my toes stepped on before I have a decent set of code. As far as the Exporter, I was assuming that the particular user of the module may or may not use the methods as methods, but as function calls. I guess the easier way to handle the dual usage (which I believe is done in Tk) is to just write code that can handle both (of course, being somewhat new to OO, that might be a little easier said than done). With every little piece of advise, my code just gets that much better.
One of the problems I was having with using method calls instead of function calls was that for some reason or another, when the $client->rpc($obj->func($params)) is done, it seems to miss the method altogether. I guess this may be a bug in the RPC module that I'm using (reference: Advanced Perl Programming). I'll have to play with that some more.
As far as the logging procedure goes, I'm stuck between two methods:
a.) Trying to flush to a log file as fast as possible (since I will have to check against this log to see if a particular user exists)
b.) Holding the log for a period of time in ram and then flushing after a set amount of time (I'm still not sure if this is even possible).
I understand what you're saying that I'm not thinking of an interface (in terms of logging), but in this case, I have to think of reading and writing the log within seconds of each other. Hmmm... I just had an idea. Is it possible to block while the log file is in read or write mode? In other words, if one user has called the 'usr_create' method, is it possible to block all other calls while the first one is finishing? I'm still somewhat new to the IPC/RPC idea, so I may just be guessing madness. If so, the interface for logging would be a little easier to implement (since I could force the other clients to wait just a second while I read and write to the log file).
Theodore Charles III
Network Administrator
Los Angeles Senior High
4650 W. Olympic Blvd.
Los Angeles, CA 90019
323-937-3210 ext. 224
email->secon_kun@hotmail.com
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.