develooper Front page | perl.php.sandwich.dev | Postings from June 2006

[svn:PHP-Sandwich] r6464 - PHP-Sandwich/trunk/lib/PHP

From:
theory
Date:
June 3, 2006 21:04
Subject:
[svn:PHP-Sandwich] r6464 - PHP-Sandwich/trunk/lib/PHP
Message ID:
20060604040355.55AD1CBA47@x12.develooper.com
Author: theory
Date: Sat Jun  3 21:03:54 2006
New Revision: 6464

Modified:
   PHP-Sandwich/trunk/lib/PHP/Interpreter.pm

Log:
I think that this might be a better example.


Modified: PHP-Sandwich/trunk/lib/PHP/Interpreter.pm
==============================================================================
--- PHP-Sandwich/trunk/lib/PHP/Interpreter.pm	(original)
+++ PHP-Sandwich/trunk/lib/PHP/Interpreter.pm	Sat Jun  3 21:03:54 2006
@@ -284,11 +284,13 @@
 
   <?php
      $perl = Perl::getInstance();
-     $file = __FILE__;
-     $instance = $perl->call_method('IO::File', 'new_from_fd', $fh);
+     $instance = $perl->call_method(
+         'DBI', 'connect',
+         array('dbi:SQLite:dbname=file.db, '', '')
+     );
   ?>
 
-This will effectively call 'IO::File->new_from_fd($fd)' and return a PHP object of type 'PerlSV::IO::File' that will proxy all the Perl classes' method calls.
+This will effectively call "DBI->connect('dbi:SQLite:dbname=file.db')" and return a PHP object of type 'PerlSV::DBI:db' that will proxy all the Perl classes' method calls.
 
 =head3 getVariable()
 



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