http://qs1969.pair.com?node_id=677166


in reply to Re: Problems installing Devel::Cover on Strawberry, seems to work on Cygwin
in thread Problems installing Devel::Cover on Strawberry, seems to work on Cygwin

I just built a Perl 5.10 with the link flags added to makefile.mk, but that didn't solve the problem with Devel::Cover.

What did work was to add the following symbols to global.sym (two more than mentioned above):

Perl_pp_nextstate Perl_pp_nextstate Perl_pp_setstate Perl_pp_setstate Perl_pp_dbstate Perl_pp_dbstate Perl_pp_entersub Perl_pp_entersub Perl_pp_cond_expr Perl_pp_and Perl_pp_andassign Perl_pp_or Perl_pp_orassign Perl_pp_xor Perl_pp_require Perl_pp_exec Perl_pp_dor Perl_pp_dorassign

This may be wrong way to do this since the comment at the top of global.sym says it's auto generated by "make regen_headers". However there doesn't seem to be a make target for that, so I don't know. It's a workaround for this particular module anyway.

Now, whether this is a good idea or not, I can't tell you. I have no clue about those issues.

I do know, however, that I would very, very much like Devel::Cover to build on Windows.

/J

  • Comment on Re^2: Problems installing Devel::Cover on Strawberry, seems to work on Cygwin
  • Download Code

Replies are listed 'Best First'.
Re^3: Problems installing Devel::Cover on Strawberry, seems to work on Cygwin
by syphilis (Archbishop) on Mar 29, 2008 at 06:16 UTC
    What did work was to add the following symbols to global.sym ....

    Seems that's one way to make those symbols public. Nice hack - though if you ever need to access a different private symbol, you'll have to rebuild perl again.

    I'm curious to know whether the Devel::Cover that you built with this hacked perl-5.10.0 will work on an unhacked perl-5.10.0. (Others would probably know the answer to that without needing to test it.) Have you tried that out ? If it works on the unhacked version of perl, then it could be handy for others if the binary of your build of Devel::Cover (either ppm package or just a tar.gz of blib) was made available.

    Cheers,
    Rob
      That did not work. Devel::Cover unsurprisingly needs access to the symbols during both build and run time. Tried it with a 5.8.8 because that's my existing installation with lots of modules I don't care to reinstall.

      Instead I patched the current installation by building a Perl 5.8.8 with the exported symbols, and then:

      cp perl58.dll \strawberry-perl\perl\bin\ cp lib\CORE\libperl58.a \strawberry-perl\perl\lib\CORE\

      This is clearly a hack, not a long-term solution.

      What that solution is I don't know. But I imagine either

      • officially promote those symbols to be public, since such an important module as Devel::Cover rely on them, or;
      • create an interface to allow Devel::Cover to instrument/inspect the internals the way it clearly needs to do to work its magic.

      Damn, that was a lot of yak shaving to start doing interesting things!

      /J