Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: Advice for moving forward with modules

by chromatic (Archbishop)
on Feb 27, 2003 at 22:35 UTC ( #239274=note: print w/replies, xml ) Need Help??

in reply to Advice for moving forward with modules

The nice thing about using objects here is that you wouldn't have to hardcode the block list file. You could pass it to the constructor. As well, you could keep the contents of the file in the object and you wouldn't need to keep reading and writing the file.

Of course, if you want to have multiple processes consulting the file, you'd want to check if it was updated since you last read it, so keep a timestamp around as object data as well. Then you could open, lock, and write the file only if you changed the status of an IP address.

  • Comment on Re: Advice for moving forward with modules

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://239274]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2016-10-21 11:47 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (288 votes). Check out past polls.