pileofrogs has asked for the wisdom of the Perl Monks concerning the following question:

UPDATE: Oy! An answer found here: 119222

Is it just me, or is there a correlate of Murphy that says your odds of finding an answer to a question that later appears obvious increase upon asking other people?

Monks, aid me, dufus that I am...

I have two machines and I want to compare perl modules on them. I've generated snapshot.pm files with the cpan utility and now I have these two nice shiny snapshot.pm files.

There are obvious ways to write a script to read these files and compare them, but it seems like something people would need often enough that I shouldn't have to write a new script. Maybe there's a feature of the cpan utility that I'm not seeing.

If there isn't a best way to do this already, is there a good way to take advantage of the format the snapshot.pm files are in? It'd be easy to just parse it with a custom regex based parser, but maybe there's advantages to the format of these files.

Thanks!
--Pileofrogs

Replies are listed 'Best First'.
Re: Compare two snapshot.pm files?
by GrandFather (Saint) on Dec 01, 2008 at 22:17 UTC

    Algorithm::Diff does the heavy lifting.

    Update: or maybe you weren't asking what I initially thought. :)


    Perl's payment curve coincides with its learning curve.

      Yeah, I don't need a diff I just want to know what's in list1 and not in list2. A monk posted a script to do that years ago (see link in OP) and that's where I'm headed.

      Thanks!
      -Pilofrogs