hirose31/inspect-perl-proc — pull request #1 by hkobayash (2014-01-23 10:22:17+00:00)
Title: Add hook @INC to print required module

Added ``` hook-require``` mode to ```inspect-perl-proc```.

Insert hooks into ```@INC``` and dump caller, callee, name of the file to be included.
Suppose checking for lazy loaded module after fork.

Output format is below.
```
2014/01/13 12:40:20 DBD/mysql.pm DBI.pm /home/hkobayash/test/local/lib/perl5/x86_64-linux/DBI.pm 781
2014/01/13 12:40:20 DBI/Const/GetInfoType.pm DBD/mysql.pm /home/hkobayash/test/local/lib/perl5/x86_64-linux/DBD/mysql.pm 108
2014/01/13 12:40:20 DBI/Const/GetInfo/ANSI.pm DBI/Const/GetInfoType.pm /home/hkobayash/test/local/lib/perl5/x86_64-linux/DBI/Const/GetInfoType.pm 44
2014/01/13 12:40:20 DBI/Const/GetInfo/ODBC.pm DBI/Const/GetInfoType.pm /home/hkobayash/test/local/lib/perl5/x86_64-linux/DBI/Const/GetInfoType.pm 45
2014/01/13 12:40:20 DBD/mysql/GetInfo.pm DBD/mysql.pm /home/hkobayash/test/local/lib/perl5/x86_64-linux/DBD/mysql.pm 755
2014/01/13 12:40:20 Text/Xslate/Compiler.pm Mouse/Util.pm /home/hkobayash/test/local/lib/perl5/x86_64-linux/Mouse/Util.pm 283
2014/01/13 12:40:20 Text/Xslate/Parser.pm Text/Xslate/Compiler.pm /home/hkobayash/test/local/lib/perl5/x86_64-linux/Text/Xslate/Compiler.pm 8
2014/01/13 12:40:20 Text/Xslate/Symbol.pm Text/Xslate/Parser.pm /home/hkobayash/test/local/lib/perl5/x86_64-linux/Text/Xslate/Parser.pm 6
2014/01/13 12:40:20 Mouse/Meta/Method/Delegation.pm Mouse/Util.pm /home/hkobayash/test/local/lib/perl5/x86_64-linux/Mouse/Util.pm 283
2014/01/13 12:40:20 Text/Xslate/Syntax/TTerse.pm Mouse/Util.pm /home/hkobayash/test/local/lib/perl5/x86_64-linux/Mouse/Util.pm 283
2014/01/13 12:40:20 unicore/lib/Perl/SpacePer.pl utf8_heavy.pl /home/hkobayash/perlbrew/perls/perl-5.16/lib/5.16.3/utf8_heavy.pl 518
2014/01/13 12:40:20 unicore/To/Cf.pl utf8_heavy.pl /home/hkobayash/perlbrew/perls/perl-5.16/lib/5.16.3/utf8_heavy.pl 518
```

Also added helper script for output tree format (```perl-requiretree```)
```console
$ cat /tmp/hook_require.20503 | ./perl-requiretree
Mouse/Util.pm
Mouse/Meta/Method/Delegation.pm (/home/hkobayash/test/local/lib/perl5/x86_64-linux/Mouse/Util.pm:283)
Text/Xslate/Compiler.pm (/home/hkobayash/test/local/lib/perl5/x86_64-linux/Mouse/Util.pm:283)
Text/Xslate/Parser.pm (/home/hkobayash/test/local/lib/perl5/x86_64-linux/Text/Xslate/Compiler.pm:8)
Text/Xslate/Symbol.pm (/home/hkobayash/test/local/lib/perl5/x86_64-linux/Text/Xslate/Parser.pm:6)
Text/Xslate/Syntax/TTerse.pm (/home/hkobayash/test/local/lib/perl5/x86_64-linux/Mouse/Util.pm:283)
utf8_heavy.pl
unicore/To/Cf.pl (/home/hkobayash/perlbrew/perls/perl-5.16/lib/5.16.3/utf8_heavy.pl:518)
unicore/lib/Perl/SpacePer.pl (/home/hkobayash/perlbrew/perls/perl-5.16/lib/5.16.3/utf8_heavy.pl:518)
DBI.pm
DBD/mysql.pm (/home/hkobayash/test/local/lib/perl5/x86_64-linux/DBI.pm:781)
DBD/mysql/GetInfo.pm (/home/hkobayash/test/local/lib/perl5/x86_64-linux/DBD/mysql.pm:755)
DBI/Const/GetInfoType.pm (/home/hkobayash/test/local/lib/perl5/x86_64-linux/DBD/mysql.pm:108)
DBI/Const/GetInfo/ANSI.pm (/home/hkobayash/test/local/lib/perl5/x86_64-linux/DBI/Const/GetInfoType.pm:44)
DBI/Const/GetInfo/ODBC.pm (/home/hkobayash/test/local/lib/perl5/x86_64-linux/DBI/Const/GetInfoType.pm:45)
```