Skip to content

Instantly share code, notes, and snippets.

@scottwalters
Created August 21, 2014 12:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottwalters/8220a1e60469ad3ef990 to your computer and use it in GitHub Desktop.
Save scottwalters/8220a1e60469ad3ef990 to your computer and use it in GitHub Desktop.
when perl code stops working on a newer version of perl
( perl5.12.3 -d:Trace t/013_complexType.t 2>&1) | grep -v '/home/scott/lib/' | sed -e 's!lib//SOAP!lib/SOAP!' > trace512.txt
( perl -d:Trace t/013_complexType.t 2>&1) | grep -v '/usr/local/lib/perl5/' > trace519.txt
# For example... the library paths to grep out vary (5.12.3 was installed in my home dir whereas 5.19.9 is in /usr/local).
kompare trace*.txt
That creates full execution traces, showing every line that Perl runs, while running the same unit test under two different versions of Perl. grep -v removes all lines traced from running installed modules so that only tracing from the unit test and non-installed module are left. kompare does a visual comparison on that. The point in the code where execution diverges for whatever reason will be clear in the visual diff.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment