saved by Sub::WrapPackages

TeeJay on 2004-05-17T11:49:50

Sub::WrapPackages looks like it could help me track down a bug in tangram where it fails to add a table to an autogenerated query.

It wraps and automates DCONWAY's Hook::LexWrap, very handy.

If this doesn't work - any other suggestions for finding a subtle bug in a complex twisty 'optimised' framework like tangram ?

oh dear - looks like another problem with debian - RCLAMP's Pod::Coverage breaks.. bah - hope I can get this working as debugging tangram is very very painful.


Sub::WrapPackages

drhyde on 2004-05-17T12:21:18

... and patches are welcome to:

  • remove the dependency on Pod::Coverage, into whose guts I delve, using a private method;
  • stop it segfaulting when wrapped subs are called in void context


The latter is a bug in Hook::LexWrap but - obviously - a wrapper around that should be able to debuggerify it. I suppose it's also a bug in perl. Perl code should not be able to make perl segfault.

Re:Sub::WrapPackages

TeeJay on 2004-05-17T14:00:35

for some reason, Sub::WrapPackages was unable to see into Tangram and attach itself to all the functions in T2::* and Tangram::** so I had to grep the modules for sub and then do some munging with search and replace in emacs to generate hundreds of wrap commands for Hook::LexWrap.

Re:Sub::WrapPackages

drhyde on 2004-05-17T14:28:38

Are those functions created by AUTOLOAD or in an eval?

Re:Sub::WrapPackages

TeeJay on 2004-05-17T17:42:56

nope - not that I know of, they do have multiple packages in single files but they look pretty normal. I probably just didn't use it right.