develooper Front page | perl.php.sandwich.dev | Postings from October 2005

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

Thread Previous
From:
David Wheeler
Date:
October 21, 2005 23:47
Subject:
Re: [svn:PHP-Sandwich] r2163 - in PHP-Sandwich/trunk: . t
Message ID:
5EFC56F9-92CB-430D-B813-DB620E1CE9F6@kineticode.com
Fellow PHP::Interpreter'ers,

On Oct 21, 2005, at 11:41 PM, theory@cvs.perl.org 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

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About