develooper Front page | | Postings from October 2005

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

Thread Previous
David Wheeler
October 21, 2005 23:47
Re: [svn:PHP-Sandwich] r2163 - in PHP-Sandwich/trunk: . t
Message ID:
Fellow PHP::Interpreter'ers,

On Oct 21, 2005, at 11:41 PM, 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?).



Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About