Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (8)
As of 2018-06-20 15:47 GMT
Find Nodes?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?

    Results (116 votes). Check out past polls.