Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: semantic diff for Perl code

by talexb (Chancellor)
on Sep 14, 2017 at 19:55 UTC ( [id://1199419]=note: print w/replies, xml ) Need Help??


in reply to Semantic diff for Perl code

The solution that comes to mind is to do a git diff on the github repository that houses the module's source code. This assumes that the module's code is stored on github, and that the revision numbers are tagged in the repository.

Failing that, you may have to download and unpack the versions you want to compare in order to do a recursive diff on the two trees.

Alex / talexb / Toronto

Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

Replies are listed 'Best First'.
Re: semantic diff for Perl code
by jonadab (Parson) on Sep 14, 2017 at 22:15 UTC
    This assumes that the module's code is stored on github,

    git diff will work on any git repository, regardless of where it is hosted; and, more generally, diff will work even if version control is not involved, if you can put the two source trees you want to compare side by side on the filesystem.

    I'm not sure this is really what was asked for, though. If a function block has been moved and possibly changed, diff mostly shows you that it was moved, and you need to actually look at the moved code line by line to see if it also changed.

      True .. I made the leap that we were talking about modules on CPAN, and that may have been a completely unsupported hypothesis.

      Since I've been using git for about ten years now (it seems that long), I now imagine git whenever someone talks about version control. And there's another logical leap.

      Alex / talexb / Toronto

      Thanks PJ. We owe you so much. Groklaw -- RIP -- 2003 to 2013.

Re^2: semantic diff for Perl code
by LanX (Saint) on Sep 14, 2017 at 20:02 UTC
    >  This assumes that ...

    ... they used version control ... (cough ;)

    Cheers Rolf
    (addicted to the Perl Programming Language and ☆☆☆☆ :)
    Je suis Charlie!

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (9)
As of 2024-04-18 07:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found