Re: Petal::CodePerl doesn't seem to work

Fergal Daly <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.petal
Message-ID <[email protected]>
Petal::CodePerl was mainly a proof of concept. It was fairly dependent
on Petal's internals. I was slowly getting patches into Petal that
would allow it (or something else) to plug in cleanly but I think JMH
didn't like some of the patches and I got too busy to push for them.

Petal has changed internally a lot since then (all this get_encoded
stuff for example) so Petal::CodePerl would need some work to get it
up to date and I don't have the time or interest to do that. If you
are interested, let me know and I can explain in more detail.
Otherwise I'll release a new version onto CPAN with a big "OUT OF
DATE" message in the docs,

F

On 8/19/05, Jonathan Vanasco <[email protected]> wrote:
> Problem:
> I can't seem to get Petal::CodePerl to work
> 
> Explanation:
> 
> (happens with both
>    use Petal::CodePerl;
>   and
>    use Petal;
>    $Petal::CodeGenerator = 'Petal::CodePerl::CodeGenerator'\
> )
> 
> Part 1:
> 
>    If I include a condition which works fine in Petal without CodePerl,
>      <span tal:condition="true: RS_ShowMe">show me</span>
> 
>    Petal sadly tells me:
> Undefined subroutine &Petal::XML_Encode_Decode::encode called at
> (eval 20) line 11.
> 
> I can't find anything that would suggest the syntax is change for if
> statements.  Removing the if statement, petal::codeperl parses things
> fine.
> 
> 
> Part 2
> 
> To make things worse, if I were  to look at the debug in /tmp ...
>       $res .= do {
>          my $res = $hash->get_encoded ('RS_CoreElement');
>          (defined $res) ? $res : "";
>      };
> 
> Based on the codeperl documentation, i believe that should be seeing:
>      $res .= do {
>          my $res = $hash{'RS_CoreElement'};
>          (defined $res) ? $res : "";
>      };
> 
> 
> Can anyone suggest help?
> 
> Platform:
>    mac osx 10.4
>    perl 5.8.6
> 
> 
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.