Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

B::Deparse has a problem with Perl6::Export:Attrs?

by PetaMem (Priest)
on Jan 18, 2008 at 13:15 UTC ( #663053=perlquestion: print w/ replies, xml ) Need Help??
PetaMem has asked for the wisdom of the Perl Monks concerning the following question:

If I deparse a file that makes use of Perl6::Export::Attrs, I get this strange error, when trying to execute/load the deparsed file:
Internal error: missing symbol for CODE(0xeaa0a0) at /opt/perl-5.8.8/l +ib/site_perl/5.8.8/Perl6/Export/Attrs.pm line 65.
The deparse call is:
perl -Ilib -MO=Deparse,-sCi0
Is there any way to circumvent this bug, so even modules that make use of Perl6::Export::Attrs remain working after deparsing? I just started using Perl6::Export::Attrs after it was glorified in PBP... Thanks for your insights.

update:

same problem with perl-5.10.0 (Deparse output is identical)

Bye
 PetaMem
    All Perl:   MT, NLP, NLU

Comment on B::Deparse has a problem with Perl6::Export:Attrs?
Select or Download Code
Re: B::Deparse has a problem with Perl6::Export:Attrs?
by stvn (Monsignor) on Jan 18, 2008 at 15:33 UTC

    From the looks of the internals of Perl6::Export::Attrs it would likely not survive a deparse/reload, there is just too much funky stuff going on (symbol table hackery, attributes, etc). B::Deparse itself is pretty fragile, and doesn't handle closures which is perhaps what your issue is, but it's hard to say for sure.

    -stvn
      Thought so. Unfortunately the same seems to apply to Class::Std, which we also use more often since PBP rules here...

      Bye
       PetaMem
          All Perl:   MT, NLP, NLU

        Unfortunately the same seems to apply to Class::Std, which we also use more often since PBP rules here

        You might want to try to get away from Class::Std, as I pointed out here, Class::Std has 56 outstanding Bugs some over 2 years old and many which are quite serious. And it also seems to be no longer maintained (last upload was Feb. 2006). Again, with all due respect to TheDamian, Class::Std is starting to look like abandonware to me.

        Of course I am going to recommend Moose as a replacement, but I am a little biased on that. Of course Moose classes won't survive a deparse either, but we have MooseX::Storage for that. Also work is currently being done on an optimizing compiler for Moose part of which is a mechanism for storing metaclass objects on disk, and since a metaclass is nothing but an object which models a class, that is pretty close to a "deparsed class".

        -stvn

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://663053]
Approved by kyle
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (6)
As of 2015-07-03 23:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (57 votes), past polls