in reply to Re^2: Best way to compare two objects?
in thread Best way to compare two objects?

How are you storing your objects in a file? Sounds like it might be better to store the data as JSON or in some other file-friendly format, read it back and compare Perl data structures. For that, there are plenty of tools.

Also consider storing the response Last-Modified or Content-Length data and using a HEAD request on your check so you don't have to fetch the whole page each time to see if it's changed.


The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re^4: Best way to compare two objects?
by nysus (Parson) on Mar 23, 2016 at 15:07 UTC

    I'm using storable to store the objects. I was data structures to store the data in the files but it was too messy. I've found moving to an OO format greatly simplifies the code.

    The website I'm getting the information from does not have a Last-Modified header. Content-Length doesn't tell me if the time of an event changed from "8 pm" to "9 pm".

    $PM = "Perl Monk's";
    $MCF = "Most Clueless Friar Abbot Bishop Pontiff Deacon Curate";
    $nysus = $PM . ' ' . $MCF;
    Click here if you love Perl Monks