Skip Menu |
 

This queue is for tickets about the DBD-SQLite CPAN distribution.

Report information
The Basics
Id: 44882
Status: resolved
Priority: 0/
Queue: DBD-SQLite

People
Owner: Nobody in particular
Requestors: TIMB [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Use of $h->func() should be deprecated and replaced with calls to driver-private 'installed methods'
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: text/plain
Charset: utf8
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 930
Download (untitled) / with headers
text/plain 930b
The old $h->func(...) way of calling driver-private methods is problematic, not least because it doesn't honour RaiseError etc! Drivers should install driver-private methods into the DBI dispatcher using the install_method() method when the driver is initialized. See http://search.cpan.org/~timb/DBI/lib/DBI/DBD.pm#The_driver_constructor (and the following "Using install_method() to expose driver-private methods" section. The install_method() requires the method name being installed to being with the driver's registered prefix, but DBD::SQLite wasn't registered. I've registered 'sqlite_' as the prefix for DBD::SQLite in the next DBI release (1.608). So you'll need to only call install_method() if the DBI VERSION is >= 1.608. To avoid problems renaming the methods currently called via func() you can use the XS ALIAS directive to give each XS driver-private method that an extra name that begins with sqlite_.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-13950-1245416619-1834.44882-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 1044
Resolved in 1.26_02. On Wed Apr 08 18:04:24 2009, TIMB wrote: Show quoted text
> The old $h->func(...) way of calling driver-private methods is > problematic, not least > because it doesn't honour RaiseError etc! > > Drivers should install driver-private methods into the DBI dispatcher > using the > install_method() method when the driver is initialized. > > See > http://search.cpan.org/~timb/DBI/lib/DBI/DBD.pm#The_driver_constructor > (and the > following "Using install_method() to expose driver-private methods" > section. > > The install_method() requires the method name being installed to being > with the driver's > registered prefix, but DBD::SQLite wasn't registered. I've registered > 'sqlite_' as the prefix for > DBD::SQLite in the next DBI release (1.608). So you'll need to only > call install_method() if the > DBI VERSION is >= 1.608. > > To avoid problems renaming the methods currently called via func() you > can use the XS > ALIAS directive to give each XS driver-private method that an extra > name that begins with > sqlite_.
MIME-Version: 1.0
X-Spam-Status: No, hits=0.0 required=8.0 tests=DK_SIGNED,HTML_MESSAGE,SPF_PASS
In-Reply-To: <rt-3.6.HEAD-13950-1245416619-1834.44882-5-0 [...] rt.cpan.org>
References: <RT-Ticket-44882 [...] rt.cpan.org> <rt-3.6.HEAD-13950-1245416619-1834.44882-5-0 [...] rt.cpan.org>
X-Virus-Checked: Checked by ClamAV on 16.mx.develooper.com
Message-ID: <b8cb49a40906190800j4f2e5072wc48ea2540d35c734 [...] mail.gmail.com>
Content-Type: multipart/alternative; boundary=0016364ecd8087360b046cb4c887
Received: from la.mx.develooper.com (x1.develooper.com [207.171.7.70]) by diesel.bestpractical.com (Postfix) with SMTP id E1DC119B81D7 for <bug-DBD-SQLite [...] rt.cpan.org>; Fri, 19 Jun 2009 11:00:31 -0400 (EDT)
Received: (qmail 2935 invoked by uid 103); 19 Jun 2009 15:00:31 -0000
Received: from x16.dev (10.0.100.26) by x1.dev with QMQP; 19 Jun 2009 15:00:31 -0000
Received: from mail-qy0-f195.google.com (HELO mail-qy0-f195.google.com) (209.85.221.195) by 16.mx.develooper.com (qpsmtpd/0.80) with ESMTP; Fri, 19 Jun 2009 08:00:25 -0700
Received: by qyk33 with SMTP id 33so1117754qyk.33 for <bug-DBD-SQLite [...] rt.cpan.org>; Fri, 19 Jun 2009 08:00:22 -0700 (PDT)
Received: by 10.220.46.20 with SMTP id h20mr2575259vcf.55.1245423621037; Fri, 19 Jun 2009 08:00:21 -0700 (PDT)
Delivered-To: cpan-bug+DBD-SQLite [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #44882] Use of $h->func() should be deprecated and replaced with calls to driver-private 'installed methods'
Domainkey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; b=hVhJsXjDulhQbiFQqfp2+MNl8msixJ4hjluIwKpTVNEleBcAvNQLzrEDjf5y7xztbS lE/KL1+s6Xu3cuwghnhF8ue3h1hVPkaG5y/MqjkEux6sblRAjGGRv0SezQGsiS08jm2S QAPYPXfjzvVK376DoErKUVuRIzWi0YGZZB0Z8=
Return-Path: <adamkennedybackup [...] gmail.com>
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type; bh=iclR/JdOtcFZatayTZ1ir36qLeFdslbBd/BRW9if69Q=; b=RsQokos1XZfwiJZlzOy4++7IdbNZzTDm8tQmGHJXZlB1PUyQj5H3bR8S0HgMLa+bKg clII5vAFGJPicWi9w5IcUtCdIep7Kk0mQo3J9e5MKKU5ryvOviTk7n5aL++ftdB40MAf /a+3p9n9+1xisXXxpDc0hrRoLdFxuURBi/URk=
X-Spam-Check-BY: 16.mx.develooper.com
X-Original-To: bug-DBD-SQLite [...] rt.cpan.org
Date: Sat, 20 Jun 2009 01:00:20 +1000
X-Spam-Level: *
To: bug-DBD-SQLite [...] rt.cpan.org
From: Adam Kennedy <adamkennedybackup [...] gmail.com>
RT-Message-ID: <rt-3.6.HEAD-13950-1245423642-533.44882-0-0 [...] rt.cpan.org>
Content-Length: 0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
X-RT-Original-Encoding: utf-8
Content-Length: 1426
Download (untitled) / with headers
text/plain 1.3k
Confirm we're just quietly deprecating right? Do we break existing ->func code? Adam K 2009/6/19 Kenichi Ishigaki via RT <bug-DBD-SQLite@rt.cpan.org> Show quoted text
> Queue: DBD-SQLite > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=44882 > > > Resolved in 1.26_02. > > On Wed Apr 08 18:04:24 2009, TIMB wrote:
> > The old $h->func(...) way of calling driver-private methods is > > problematic, not least > > because it doesn't honour RaiseError etc! > > > > Drivers should install driver-private methods into the DBI dispatcher > > using the > > install_method() method when the driver is initialized. > > > > See > > http://search.cpan.org/~timb/DBI/lib/DBI/DBD.pm#The_driver_constructor<http://search.cpan.org/%7Etimb/DBI/lib/DBI/DBD.pm#The_driver_constructor> > > (and the > > following "Using install_method() to expose driver-private methods" > > section. > > > > The install_method() requires the method name being installed to being > > with the driver's > > registered prefix, but DBD::SQLite wasn't registered. I've registered > > 'sqlite_' as the prefix for > > DBD::SQLite in the next DBI release (1.608). So you'll need to only > > call install_method() if the > > DBI VERSION is >= 1.608. > > > > To avoid problems renaming the methods currently called via func() you > > can use the XS > > ALIAS directive to give each XS driver-private method that an extra > > name that begins with > > sqlite_.
> > > >
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
Content-Length: 2094
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-13950-1245423642-533.44882-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Disposition: inline
Charset: utf8
References: <RT-Ticket-44882 [...] rt.cpan.org> <rt-3.6.HEAD-13950-1245416619-1834.44882-5-0 [...] rt.cpan.org> <b8cb49a40906190800j4f2e5072wc48ea2540d35c734 [...] mail.gmail.com> <rt-3.6.HEAD-13950-1245423642-533.44882-0-0 [...] rt.cpan.org>
Content-Type: text/plain
Message-ID: <rt-3.6.HEAD-13950-1245425843-186.44882-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 2172
Download (untitled) / with headers
text/plain 2.1k
We still have the func() method for the users of DBI < 1.608, and we're testing both features provided by installed methods and the ones by the func(). We should say it louder (in blogs etc) that now we recommend to use installed methods instead of using older func() as the former is a modern best practice, and I've already noted that in the pod, but we shouldn't remove the func() right now, as it surely breaks existing codes (as DBI that supports SQLite's installed method was released on the 5th May 2009, it's too early to deprecate our func()). Kenichi On Fri Jun 19 11:00:42 2009, adamkennedybackup@gmail.com wrote: Show quoted text
> Confirm we're just quietly deprecating right? > > Do we break existing ->func code? > > Adam K > > 2009/6/19 Kenichi Ishigaki via RT <bug-DBD-SQLite@rt.cpan.org> >
> > Queue: DBD-SQLite > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=44882 > > > > > Resolved in 1.26_02. > > > > On Wed Apr 08 18:04:24 2009, TIMB wrote:
> > > The old $h->func(...) way of calling driver-private methods is > > > problematic, not least > > > because it doesn't honour RaiseError etc! > > > > > > Drivers should install driver-private methods into the DBI
> dispatcher
> > > using the > > > install_method() method when the driver is initialized. > > > > > > See > > >
> http://search.cpan.org/~timb/DBI/lib/DBI/
DBD.pm#The_driver_constructor<http://search.cpan.org/%7Etimb/DBI/lib/ DBI/DBD.pm#The_driver_constructor> Show quoted text
> > > (and the > > > following "Using install_method() to expose driver-private
> methods"
> > > section. > > > > > > The install_method() requires the method name being installed to
> being
> > > with the driver's > > > registered prefix, but DBD::SQLite wasn't registered. I've
> registered
> > > 'sqlite_' as the prefix for > > > DBD::SQLite in the next DBI release (1.608). So you'll need to
> only
> > > call install_method() if the > > > DBI VERSION is >= 1.608. > > > > > > To avoid problems renaming the methods currently called via func()
> you
> > > can use the XS > > > ALIAS directive to give each XS driver-private method that an
> extra
> > > name that begins with > > > sqlite_.
> > > > > > > >


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.