Re: [Dbix-class] ★ VOTE NOW: DBIC Governance and Namespace Control ★

2016-12-05 Thread Toby Corkindale
I vote: Proposal A ___ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class IRC: irc.perl.org#dbix-class SVN: http://dev.catalyst.perl.org/repos/bast/DBIx-Class/ Searchable Archive: http://www.grokbase.com/group/dbix-class@lists.scsys.co.uk

[Dbix-class] Current DBIC does not pass tests on fresh Perl/CPAN install

2014-01-12 Thread Toby Corkindale
Hi, The current stable version of DBIC (http://www.cpan.org/authors/id/R/RI/RIBASUSHI/DBIx-Class-0.08250.tar.gz) does not pass its unit tests on a fresh Perl/CPAN install. ie. Install Perl (via perlbrew, source, whatever) and then install cpanminus, and then run cpanm DBIx::Class The error is:

Re: [Dbix-class] Correct way to rollback txn_scope_guard

2013-07-25 Thread Toby Corkindale
On 23 July 2013 20:56, Peter Rabbitson rabbit+d...@rabbit.us wrote: On Tue, Jul 23, 2013 at 06:58:56PM +1000, Toby Corkindale wrote: Hi, What is the correct way to rollback when you're using a txn_scope_guard, and it's intentional, and you'd rather avoid getting a scary warning message

[Dbix-class] Correct way to rollback txn_scope_guard

2013-07-23 Thread Toby Corkindale
Hi, What is the correct way to rollback when you're using a txn_scope_guard, and it's intentional, and you'd rather avoid getting a scary warning message printed to the logs? -Toby ___ List: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class

Re: [Dbix-class] DBIx::Class::Exceptions

2012-11-07 Thread Toby Corkindale
On 5 November 2012 20:19, Peter Rabbitson rabbit+d...@rabbit.us wrote: On Fri, Nov 02, 2012 at 03:41:48PM +1100, Toby Corkindale wrote: Hi, It used to be the case (some versions ago) that if you died with an object inside a txn_do() then the re-thrown error would still contain that object

Re: [Dbix-class] DBIx::Class::Exceptions

2012-11-06 Thread Toby Corkindale
Thanks -- have had a public holiday here and was out getting soaked on a bike a lot, but will look at the branch shortly and get back to you. On 5 November 2012 20:19, Peter Rabbitson rabbit+d...@rabbit.us wrote: On Fri, Nov 02, 2012 at 03:41:48PM +1100, Toby Corkindale wrote: Hi, It used

[Dbix-class] DBIx::Class::Exceptions

2012-11-01 Thread Toby Corkindale
Hi, It used to be the case (some versions ago) that if you died with an object inside a txn_do() then the re-thrown error would still contain that object. However now it seems to be stringified on the way out. To give an example, I'm sure I used to be able to do this: try { $schema-txn_do(sub

[Dbix-class] Re: DBIx::Class::Exceptions

2012-11-01 Thread Toby Corkindale
(Custom::Exception) { $_-custom_method } default { die $_ } } }; On 2 November 2012 15:41, Toby Corkindale t...@dryft.net wrote: Hi, It used to be the case (some versions ago) that if you died with an object inside a txn_do() then the re-thrown error would still contain that object

Re: [Dbix-class] Re: as_subselect_rs-delete bug?

2012-07-11 Thread Toby Corkindale
On 11 July 2012 23:35, Rob Kinyon rob.kin...@gmail.com wrote: On Wed, Jul 11, 2012 at 6:11 AM, fREW Schmidt fri...@gmail.com wrote: I wrote a test that confirms it, but it actually has no where clause at all when I test it, which is even scarier. Before we go ahead confirming failures and

[Dbix-class] as_subselect_rs-delete bug?

2012-07-10 Thread Toby Corkindale
Hi, I discovered what smells like a bug in the as_subselect_rs codepath, but it may just me doing it wrong.. The Perl code looks like this: $schema-resultset('Step')-search( { file_id = $file_id, 'stage.name' = 'Final', }, { join = 'stage' }

[Dbix-class] Re: as_subselect_rs-delete bug?

2012-07-10 Thread Toby Corkindale
On 11 July 2012 15:23, Toby Corkindale t...@dryft.net wrote: This was on version 0.08196 but I can try on a later one in a moment. Just confirming it still happens on 0.08198. -- Turning and turning in the widening gyre The falcon cannot hear the falconer Things fall apart; the center cannot

[Dbix-class] Re: as_subselect_rs-delete bug?

2012-07-10 Thread Toby Corkindale
maybe I'd expect something like DELETE FROM step WHERE id IN ( SELECT id FROM step JOIN stage ON (step.stage_id = stage.id) WHERE step.file_id = ? AND stage.name = 'Final' ); On 11 July 2012 15:28, Toby Corkindale t...@dryft.net wrote: On 11 July 2012 15:23, Toby Corkindale t...@dryft.net

Re: [Dbix-class] Performance degradation due to Class::C3

2011-06-20 Thread Toby Corkindale
an old to new version of Perl, due to all the roadblocks in the way, and because in the process you will almost certainly end up upgrading a bunch of other things at the same time. Cheers, Toby On Jun 17, 2011, at 2:53, Toby Corkindale t...@dryft.net wrote: On 14 June 2011 22:40, Peter

Re: [Dbix-class] Performance degradation due to Class::C3

2011-06-17 Thread Toby Corkindale
On 14 June 2011 22:40, Peter Rabbitson rabbit+d...@rabbit.us wrote: Toby Corkindale wrote: On 9 June 2011 17:51, Jorge Gonzalez jorge.gonza...@daikon.es wrote: BTW, thanks for resurrecting a 3 month old thread :-) I had not checked the EOL status of 5.8 and 5.10. And then again: RHEL 6

Re: [Dbix-class] Performance degradation due to Class::C3

2011-06-14 Thread Toby Corkindale
On 9 June 2011 17:51, Jorge Gonzalez jorge.gonza...@daikon.es wrote: BTW, thanks for resurrecting a 3 month old thread :-) I had not checked the EOL status of 5.8 and 5.10. And then again: RHEL 6 is based on 5.10, which is also EOL'ed...? Yes, only the current and prior-to-current versions

Re: [Dbix-class] Performance degradation due to Class::C3

2011-06-08 Thread Toby Corkindale
On 1 March 2011 01:39, Jorge Gonzalez jorge.gonza...@daikon.es wrote: I'm developing an app with Catalyst 5.80024, on perl 5.8.8, 32 bits; DBIx::Class models. [snip] Perl 5.8.x has been beyond end-of-life for quite a while, as has 5.10.x more recently. The 5.8 stream is almost ten years old,

[Dbix-class] Breakage on .127 - .192 upgrade

2011-05-19 Thread Toby Corkindale
Hi, I don't know how I failed to pick this up during the testing period for the .19x versions. I have some code that fails on dbic .192, but works when rolled back to .127. The failure is due to the Result class defining some accessors with mk_classdata() which are referred to from within a

[Dbix-class] Creating functional indexes

2010-12-12 Thread Toby Corkindale
Hi, I'd like to create functional indexes on some columns.. ie. The raw sql would be: CREATE TABLE foo (bar TEXT); CREATE INDEX foo_bar_idx ON foo( lower(bar) ); I'm trying to set this up via a DBIC Schema using sqlt_deploy_hook(). Is there a way? I've tried $sqlt_table-add_index( fields =

[Dbix-class] DBIx::Class w/SQLite and COLLATE RTRIM

2010-10-13 Thread Toby Corkindale
Hi, Background knowledge: SQLite breaks from SQL traditions by not ignoring trailing whitespace when comparing strings. ie. SELECT 'FOO ' = 'FOO'; # returns false However you can specify that it trim the whitespace and DWIW like this: SELECT 'FOO ' = 'FOO' COLLATE RTRIM; # returns true So,

[Dbix-class] Improved resultset iterators

2010-08-04 Thread Toby Corkindale
try again now. Cheers! See below for background topic and then my comments. On 07/05/10 06:31, Matt S Trout wrote: On Tue, May 04, 2010 at 01:08:52PM +1000, Toby Corkindale wrote: On 22/04/10 19:00, Peter Rabbitson wrote: Toby Corkindale wrote: Hey all, Wouldn't it be nice if the ResultSet

Re: [Dbix-class] DBIx::Class::Direct: what's wrong with that ?

2010-06-06 Thread Toby Corkindale
On 06/06/10 09:13, Marc Chantreux wrote: hello all, I'm pretty new in the ORM world and i'm trying to figure out how to write very simple webapps as quick as possible. DBIx::Class is awesome and i would like to use it to add persistence to my buziness objects. For a given Users class, i would

Re: [Dbix-class] Automatic quoting

2010-06-06 Thread Toby Corkindale
On 04/06/10 19:02, Will Hawes wrote: Yesterday a colleague new to DBIC ran into a problem with a column named using a reserved word in MySQL. He worked around it by using a different column name, but while discussing the issue he asked why quote_char and name_sep are not set automatically. I

Re: [Dbix-class] Improved resultset iterators

2010-05-07 Thread Toby Corkindale
On 07/05/10 06:31, Matt S Trout wrote: On Tue, May 04, 2010 at 01:08:52PM +1000, Toby Corkindale wrote: On 22/04/10 19:00, Peter Rabbitson wrote: Toby Corkindale wrote: Hey all, Wouldn't it be nice if the ResultSet iterators were a bit more advanced? I would love it if the iterator built

Re: [Dbix-class] Improved resultset iterators

2010-05-03 Thread Toby Corkindale
On 22/04/10 19:00, Peter Rabbitson wrote: Toby Corkindale wrote: Hey all, Wouldn't it be nice if the ResultSet iterators were a bit more advanced? I would love it if the iterator built into DBIx::Class supported some more functional programming style methods. ie. So that I could do: $schema

[Dbix-class] Improved resultset iterators

2010-04-22 Thread Toby Corkindale
Hey all, Wouldn't it be nice if the ResultSet iterators were a bit more advanced? I would love it if the iterator built into DBIx::Class supported some more functional programming style methods. ie. So that I could do: $schema-resultset('Users')-search( { first_name = 'Bob' } )-foreach(

Re: [Dbix-class] SQLA bug with = operator

2010-04-22 Thread Toby Corkindale
On 22/04/10 18:57, Peter Rabbitson wrote: Toby Corkindale wrote: I think this is actually an SQL::Abstract bug, but the SQLA docs say to try the dbic mailing lists for support, so.. Steps to reproduce under SQL::Abstract: my $sql = SQL::Abstract-new; my($stmt, @bind) = $sql-select('foo

[Dbix-class] SQLA bug with = operator

2010-04-21 Thread Toby Corkindale
I think this is actually an SQL::Abstract bug, but the SQLA docs say to try the dbic mailing lists for support, so.. Steps to reproduce under SQL::Abstract: my $sql = SQL::Abstract-new; my($stmt, @bind) = $sql-select('foo', 'foo', { address = { '=' = '10.2.3.4' }, } ); $stmt

[Dbix-class] Perl Modlist and DBIx::Class

2010-04-19 Thread Toby Corkindale
I was browsing the CPAN module list, and I noticed that although various DBIx::Class::* plugins are listed, DBIx::Class itself is not. I thought that was a bit odd. http://search.cpan.org/modlist/Database_Interfaces/DBIx Cheers, Toby ___ List:

Re: [Dbix-class] forking within a single DBIx::Class transaction -- possible?

2009-10-13 Thread Toby Corkindale
Leandro Hermida wrote: Hi everyone, Been a long time since I've posted on this list, but been using DBIx::Class for a couple years now and love it... great software. Anywho, I've wrriten this code which do parallel processing (using Parallel::Forker) within a single DBIx::Class transaction.

Re: [Dbix-class] Turning off prepared statements for LIKE searches

2009-08-20 Thread Toby Corkindale
Toby Corkindale wrote: Jacob Bunk Nielsen wrote: Hi I have read an interesting blog post about how prepared statements in PostgreSQL does not work well with LIKE searches. It can be found at: http://blog.endpoint.com/2009/08/debugging-prepared-statements.html I'm hit by this in several places

Re: [Dbix-class] ANNOUNCE: DBIx::Class 0.08108 pre-release

2009-07-06 Thread Toby Corkindale
Peter Rabbitson wrote: Greetings Pre-release tarball of DBIC 0.08108 is now available at [1]. There was a ton of improvements under the hood, but from a user perspective everything should remain the same. The tarball should end up on CPAN by the end of next week if no problem reports are

[Dbix-class] Cat Model DBIC Schema fails test if *optional* prereq isn't installed

2009-06-29 Thread Toby Corkindale
Hi, Catalyst::Model::DBIC::Schema lists Catalyst::Devel as an *optional* dependency. However if you do not have Catalyst::Helper installed (via Catalyst::Devel) then C-M-DBIC-Schema fails its unit tests and won't install via CPAN. -Toby ___

[Dbix-class] DBIx::Class 0.08104 missing files

2009-06-10 Thread Toby Corkindale
Attempting to install DBIC 0.08104, results in: perl Makefile.PL ... Checking if your kit is complete... Warning: the following files are missing in your kit: t/47bind_attribute.t t/66relationship.t t/96multi_create/cd_single.t

Re: [Dbix-class] regression introduced in DBIC r5298.. Or we're Doing It Wrong..

2009-06-08 Thread Toby Corkindale
Matt S Trout wrote: On Wed, Jun 03, 2009 at 06:14:13PM +1000, Toby Corkindale wrote: Hi guys, I've encountered a regression in DBIC, introduced in revision 5298. It's more than likely that the way things were being done in the code here were not correct and *shouldn't* have worked previously

Re: [Dbix-class] regression introduced in DBIC r5298.. Or we're Doing It Wrong..

2009-06-03 Thread Toby Corkindale
Toby Corkindale wrote: Hi guys, I've encountered a regression in DBIC, introduced in revision 5298. It's more than likely that the way things were being done in the code here were not correct and *shouldn't* have worked previously, but I can't seem to work it out myself. There's a single

[Dbix-class] [PATCH] Resultset accessors for lazy people

2009-04-15 Thread Toby Corkindale
Toby Corkindale wrote: Therefore I'd like to propose that DBIC implements direct accessors for resultsets, so that I can type: $schema-MyObject-find(1); [snip] Well, no-one spoke up, so here's the patch (against svn trunk). It allows you to access resultsets via a direct method off $schema

Re: [Dbix-class] Resultset accessors for lazy people, and compile-time checking.

2009-04-15 Thread Toby Corkindale
Peter Rabbitson wrote: Toby Corkindale wrote: Hi, Another task I commonly do in DBIC is to access resultsets from the $schema object, eg: $schema-resultset('MyObject')-find(1); Sometimes I make a mistake, and write: $schema-resultset('MyObjcet')-find(1); However that compiles just fine

[Dbix-class] Resultset accessors for lazy people, and compile-time checking.

2009-04-09 Thread Toby Corkindale
Hi, Another task I commonly do in DBIC is to access resultsets from the $schema object, eg: $schema-resultset('MyObject')-find(1); Sometimes I make a mistake, and write: $schema-resultset('MyObjcet')-find(1); However that compiles just fine, and won't get picked up until that bit of code is

Re: [Dbix-class] Adding relationships to an already-constructed schema

2009-04-02 Thread Toby Corkindale
Jess Robinson wrote: On Thu, 2 Apr 2009, Toby Corkindale wrote: Start by assuming I'm smoking crack and do actually want to do this.. :) If I have a $schema that is already initialised, and I decide I want to add a new relationship to one of my tables, what is the proper way to do so

[Dbix-class] Adding relationships to an already-constructed schema

2009-04-01 Thread Toby Corkindale
Hi, Start by assuming I'm smoking crack and do actually want to do this.. :) If I have a $schema that is already initialised, and I decide I want to add a new relationship to one of my tables, what is the proper way to do so? Is it this? my $schema = ExampleApp-connect(..); my

Re: [Dbix-class] Adding relationships to an already-constructed schema

2009-04-01 Thread Toby Corkindale
Toby Corkindale wrote: Hi, Start by assuming I'm smoking crack and do actually want to do this.. :) If I have a $schema that is already initialised, and I decide I want to add a new relationship to one of my tables, what is the proper way to do so? Is it this? my $schema = ExampleApp

Re: [Dbix-class] Class::C3::Componentised bug (was deployment bug with DBIC running from PAR)

2009-02-04 Thread Toby Corkindale
Peter Rabbitson wrote: Toby Corkindale wrote: Peter Rabbitson wrote: Toby Corkindale wrote: I need to stop replying to myself :( I'd say the problem lies this block of code: # Look through the @INC path to find the file foreach ( @try_first, @INC ) { my $full = $_/$filename

Re: [Dbix-class] Class::C3::Componentised bug (was deployment bug with DBIC running from PAR)

2009-02-03 Thread Toby Corkindale
Peter Rabbitson wrote: Toby Corkindale wrote: I need to stop replying to myself :( I'd say the problem lies this block of code: # Look through the @INC path to find the file foreach ( @try_first, @INC ) { my $full = $_/$filename; next unless -e $full; return $UNIX

[Dbix-class] Class::C3::Componentised bug (was deployment bug with DBIC running from PAR)

2009-01-27 Thread Toby Corkindale
Toby Corkindale wrote: Hi, I seem to have hit an issue in a specific case: Deployment, to a Postgres DB, when DBIx::Class is running from a PAR file. The crux is that DBIx::Class::Storage::DBI::Pg has overridden sqlt_type() to return 'PostgreSQL' rather than the default behaviour from DBIx

Re: [Dbix-class] ANN - SQLite 3.6.8 adds nested transactions

2009-01-13 Thread Toby Corkindale
John Siracusa wrote: On Mon, Jan 12, 2009 at 11:41 PM, Darren Duncan dar...@darrenduncan.net wrote: Note that I was also thinking about the fact that 1.14 is known in some circles to have introduced bugs that 1.13 didn't have, so being able to address this would take more C-fu than simply

Re: [Dbix-class] ANN - SQLite 3.6.8 adds nested transactions

2009-01-13 Thread Toby Corkindale
Darren Duncan wrote: Toby Corkindale wrote: The disconnection code is borked too; if you connect, do some work with statement handles, and disconnect again, and then repeat many times in the same process, you'll crash out eventually. The annoying thing is that there are trivial patches

Re: [Dbix-class] ANN - SQLite 3.6.8 adds nested transactions

2009-01-12 Thread Toby Corkindale
Darren Duncan wrote: Good news everyone! The SQLite DBMS, as of the new version 3.6.8, now has nested transaction support. See http://www.sqlite.org/releaselog/3_6_8.html for the release announcement, and http://www.sqlite.org/lang_savepoint.html for documentation of the feature. As far

Re: [Dbix-class] how to add a method that performs a database lookup?

2008-12-16 Thread Toby Corkindale
Adam Witney wrote: [snip] The second place i might need this is that i have some data in a second database and so i would have to interact with this using dblink (I am using PostgreSQL). This seems easier to just write the query in a method? Doesn't Pg just represent the foreign DBI-Linked

Re: [Dbix-class] how to add a method that performs a database lookup?

2008-12-15 Thread Toby Corkindale
Adam Witney wrote: I am new to DBIx::Class, but have so far been impressed with how easy it is to use, so thanks to those that have developed and continue to develop it. I wanted to know, is there a way of adding a method to a class that performs a separate database lookup. I have used the