http://qs321.pair.com?node_id=159686


in reply to File::Dependencies - a new module looking for a good name (and more discussion)

I like File::Modified (and File::Dependencies, for that matter), but File::Snapshot and File::Monitor also popped into my head for some reason.

Seems like a very useful module, and yes, I think it's totally different than the cron-onymous monk's accusation. Nice work. :-)

  • Comment on Re: File::Dependencies - a new module looking for a good name (and more discussion)

Replies are listed 'Best First'.
Re: Re: File::Dependencies - a new module looking for a good name (and more discussion)
by Dogma (Pilgrim) on Apr 17, 2002 at 06:06 UTC
    I agree that File::Dependencies maybe misleading. File::Modified, File::Changed, File::Updated all sound much more accurate to me.

    The suggestion to add Save/Load methods is something I would serously consider. That and a method to tell the time between updates would make this module much more flexible.

    Cheers,
    -Dogma

      Storing the file signatures should be easy to add, as I will most likely add a stringification routine to the File::Signature class; retrieving the signatures from a file would then mean parsing the file back in - something which would get nasty with weird filenames - here, either a small DBMS or a tied DB would be necessary to store the data, not nice, but feasible.

      Getting the difference between two signatures does not always have a meaning, for example the difference between two MD5 checksums. I could add the method to always store the timestamps, but timestamps are not always something you want to rely on - I'm thinking about NFS mounts with jumping clock times. A method to tell the time since the last update to the file-database is a responsibility of the main program and not of the module.

      perl -MHTTP::Daemon -MHTTP::Response -MLWP::Simple -e ' ; # The $d = new HTTP::Daemon and fork and getprint $d->url and exit;#spider ($c = $d->accept())->get_request(); $c->send_response( new #in the HTTP::Response(200,$_,$_,qq(Just another Perl hacker\n))); ' # web