Re: [svn:PHP-Sandwich] r2163 - in PHP-Sandwich/trunk: . t

[email protected] (David Wheeler) Fri, 21 Oct 2005 23:47:13 -0700
Newsgroups perl.php.sandwich.dev
Message-ID <[email protected]>
Fellow PHP::Interpreter'ers,

On Oct 21, 2005, at 11:41 PM, [email protected] wrote:

> +$php->eval(q/echo fread($fh, 100)/), 'Access the file handle';
> +is $output, 'File handle output.', 'Check the file handle output';
> +$php->clear_output;

This test fails with an error:

   PHP Error in eval at t/test_symbols.t line 29.

My guess is that PHP::Interpreter isn't recognizing the file handle.

> +
> +ok $php->eval(q/code();/), 'Execute the code'; # Maybe $code()?
> +is $output, 'hello', 'Check the code output';
> +$php->clear_output;

This test also fails. Again, I don't think that PHP::Interpreter is  
recognizing the code reference.

So, can these be fixed? Or at least can the code reference one be  
fixed? Or will there have to be some other workaround? Since the  
PHP::Interpreter docs state:

   Any other data that is passed [to new()] will be installed in the PHP
   global symbol table.

I think that we should have some reasonably comprehensive tests of  
what translates and what doesn't, and then document what's supported  
(hashes, arrays, scalars, code references?) and what's not (formats  
and globs?).

Thanks,

David