Subject: | [wish] output useful for diff |
There may be more options lurking in this field, but for now I would be very happy to see an option to generate the output suitable for diff with output from another system. If I have the same script on two systems, and it works on one, but fails on the other, I want to compare the versions of the modules loaded. Devel::TraceUse is perfect for that, but in this specific case spews too much info.
As an example of what I used today to be able to compare:
$ perl -d:TraceUse /pro/po/bev/bin/sGBAb.pl -v2 lg1010161309 2>&1 |\
perl -ne's/, \S+ line \d+.*$//;if(s/^\s*\d+\.\s+//){push@x,$_;next}m/^(Modules used,|Possible pr)/ and print sort @x;print'
ideally that could be more like
$ perl -d:TraceUse=sorted_simple /pro/po/bev/bin/sGBAb.pl -v2 lg1010161309
Example of output change
$ perl -d:TraceUse=hidecore -MDP -we'DDumper \1'
\1
Modules used from -e:
1. DP 0.46, -e line 0 [main]
2. Data::Peek 0.46, DP.pm line 1 [main]
9. Config_heavy.pl, Config.pm line 80
10. Config_git.pl, Config_heavy.pl line 1343 [Config]
11. Perl::Tidy 20160302, Data/Peek.pm line 24 (eval 1)
21. Encode::ConfigLocal, Encode.pm line 61 (FAILED)
45. HTML::Entities 3.69, Perl/Tidy.pm line 4594 (eval 12) [Perl::Tidy::HtmlWriter]
46. HTML::Parser 3.72, HTML/Entities.pm line 152
Possible proxies:
2 File/Copy.pm line 18, sub Perl::Tidy::BEGIN
$ perl -d:TraceUse=hidecore -MDP -we'DDumper \1' 2>&1 |\
perl -ne's/, \S+ line \d+.*$//;if(s/^\s*\d+\.\s+//){push@x,$_;next}m/^(Modules used,|Possible pr)/ and print sort @x;print'
\1
Modules used from -e:
Config_git.pl
Config_heavy.pl
DP 0.46
Data::Peek 0.46
Encode::ConfigLocal
HTML::Entities 3.69
HTML::Parser 3.72
Perl::Tidy 20160302
Possible proxies:
2 File/Copy.pm line 18, sub Perl::Tidy::BEGIN