On Thu, Feb 05, 2015 at 09:09:25AM +0100, H.Merijn Brand wrote:
> On Wed, 04 Feb 2015 20:07:11 -0800, Darren Duncan
> <dar...@darrenduncan.net> wrote:
> 
> > A discussion started on dbi-users which I thought seemed more appropriate 
> > to 
> > continue on dbi-dev assuming it caries on in the direction of a design 
> > discussion.  I have quoted the important parts of each original message 
> > below, 
> > to get it started. -- Darren Duncan
> 
> FWIW I tested perl6 with Inline::Perl5 and perl5's DBI, and it works :)
> If not having DBI for perl6 is the *only* reason not to start with
> perl6, then start today!

> use v6;
> use Slang::Tuxic;
> use Inline::Perl5;
> 
> my $p5 = Inline::Perl5.new;
> $p5.use ("DBI");
> 
> my $dbh = $p5.invoke ("DBI", "connect", "dbi:Pg:");
> my $sth = $dbh.prepare ("select count (*) from url");
> $sth.execute;
> my @count = $sth.fetchrow_array;
> @count[0].say;
> $ perl6 dbi6.pl
> 491826
> 
> I didn't yet find the correct syntax for bind_columns in Inline::Perl5

That's relying on 'raw' Inline::Perl5 semantics. There's probably value
in creating a module that uses Inline::Perl5 behind the scenes but
presents a more friendly API, eg for bind_columns etc.

Tim.

Reply via email to