Re: [Dbix-class] IMPORTANT: A discussion of DBIC governance and future development

2016-10-24 Thread Dave Howorth

On 2016-10-24 10:01, Peter Mottram wrote:

On 24/10/16 00:11, Darren Duncan wrote:

On 2016-10-23 3:04 PM, Karen Etheridge wrote:

 > I also like the idea of default dbic being the stable one, and the
dbic2
being opt in. +1

I don't see how it could credibly be the other way. There is no way
to get
informed consent from all the existing DBIx::Class users to ensure
that they
understand they are getting bleeding-edge code. Moving to a more risky
configuration must always be done intentionally.


Those are my thoughts exactly.  If DBIC ever started using multiple
namespaces to distinguish LTS from bigger changes, the LTS should
always have the existing name.  Users should always get the "safe"
option by default and explicitly opt-in to risk, rather than the
opposite.  This assumes the use of multiple namespaces, and is
inapplicable if only one name is used. -- Darren Duncan


If having two name spaces makes everyone happy and there are people
available to work on both then +1 from me as long as the existing
namespace is the more conservative one.


Does using two name spaces give any more security than git branches?

Any developments should be created in a new branch and only folded in 
when everybody is happy, and with a back compatibility warranty.


Or are people proposing that the project is permanently forked?

Oh, and are there any volunteers to maintain the stable name space, if 
there are to be two?


Cheers, Dave

___
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


Re: [Dbix-class] updated release has broken my code

2016-01-22 Thread Dave Howorth



On 2016-01-21 17:07, Peter Rabbitson wrote:

On 01/20/2016 04:32 PM, Dave Howorth wrote:

I have various applications that use DBIx::Class. I just moved one of
them, which has been running OK for quite a while, to a new machine and
that meant it got a new environment, including an updated DBIx::Class.
It no longer runs, and it would help me to try to understand what is
broken in my own code if I could understand how the DBIC code works and
why it was changed. If anybody could give me any pointers, I'd be 
grateful.


This is related to RT#107462. I am still deep into the txn rework so I 
have not yet looked into this properly. I apologize for the great 
delay, there have been too many distractions lately :(


Please add a note to the RT in question, linking to this exchange, so 
I do not end up dropping it on the floor in the coming week.


In the meantime the best I can recommend is freeze the version for a 
bit longer.
I've added a comment to the bug pointing back to this thread. Thanks for 
all your hard work on DBIx::Class.


Cheers, Dave

___
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] Errors installing DBIx::Class

2016-01-22 Thread Dave Howorth
In the previous thread, Peter suggested I freeze the version of 
DBIx::Class until the code was updated to fix my problem. It's actually 
a new machine so it's not a question of reverting to the previous 
version but of finding a version that will install. I just tried


  cpanm DBIx::Class@0.08270

Unfortunately it failed the tests as did 0.08200 with similar errors. 
I'd appreciate any thoughts on how to get a working system.


The machine is running Scientific Linux 6, which is new to me, and 
because its perl is too old (5.10.1) for some of my code I'm using 
perlbrew, which is also new to me, to give me 5.22.1, which is also new 
to me. perl -V output at the end of this message. So perhaps I need some 
other patch or to downgrade something else, but what?


Thanks for any help.

The test errors were:

#   Failed test 'DBIx::Class::SQLAHacks::import appears to have entered 
inheritance chain by import into SQL::Abstract'

#   at t/55namespaces_cleaned.t line 146.
# Looks like you failed 1 test of 13975.
t/55namespaces_cleaned.t 
Dubious, test returned 1 (wstat 256, 0x100)
Failed 1/13975 subtests
(less 48 skipped subtests: 13926 okay)

#   Failed test 'Cascading delete on Ordered has_many works'
#   at t/60core.t line 362.
# died: DBIx::Class::Exception 
(DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: 
DBD::SQLite::st execute failed: UNIQUE constraint failed: track.cd, 
track.position [for Statement "UPDATE track SET position = ? WHERE ( 
trackid = ? )"] at t/60core.t line 362

# )
#   Failed test 'Cascading through has_many top level.'
#   at t/60core.t line 363.
#  got: '3'
# expected: '0'

#   Failed test 'Cascading through has_many children.'
#   at t/60core.t line 364.
#  got: '3'
# expected: '0'
# Looks like you failed 3 tests of 123.
t/60core.t ..
Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/123 subtests
(less 18 skipped subtests: 102 okay)



$ perl -V
Summary of my perl5 (revision 5 version 22 subversion 1) configuration:

  Platform:
osname=linux, osvers=2.6.32-431.20.3.el6.x86_64, archname=x86_64-linux
uname='linux scop5.lmb.internal 2.6.32-431.20.3.el6.x86_64 #1 smp 
thu jun 19 14:01:59 cdt 2014 x86_64 x86_64 x86_64 gnulinux '
config_args='-de 
-Dprefix=/home/dhoworth/perl5/perlbrew/perls/perl-5.22.1 
-Aeval:scriptdir=/home/dhoworth/perl5/perlbrew/perls/perl-5.22.1/bin'

hint=recommended, useposix=true, d_sigaction=define
useithreads=undef, usemultiplicity=undef
use64bitint=define, use64bitall=define, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
  Compiler:
cc='cc', ccflags ='-fwrapv -fno-strict-aliasing -pipe 
-fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2',

optimize='-O2',
cppflags='-fwrapv -fno-strict-aliasing -pipe -fstack-protector 
-I/usr/local/include'
ccversion='', gccversion='4.4.7 20120313 (Red Hat 4.4.7-16)', 
gccosandvers=''
intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, 
doublekind=3
d_longlong=define, longlongsize=8, d_longdbl=define, 
longdblsize=16, longdblkind=3
ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', 
lseeksize=8

alignbytes=8, prototype=define
  Linker and Libraries:
ld='cc', ldflags =' -fstack-protector -L/usr/local/lib'
libpth=/usr/local/lib /usr/lib /lib/../lib64 /usr/lib/../lib64 /lib 
/lib64 /usr/lib64 /usr/local/lib64

libs=-lpthread -lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc
perllibs=-lpthread -lnsl -ldl -lm -lcrypt -lutil -lc
libc=libc-2.12.so, so=so, useshrplib=false, libperl=libperl.a
gnulibc_version='2.12'
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -O2 -L/usr/local/lib 
-fstack-protector'



Characteristics of this binary (from libperl):
  Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
PERL_NEW_COPY_ON_WRITE PERL_PRESERVE_IVUV
USE_64_BIT_ALL USE_64_BIT_INT USE_LARGE_FILES
USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC USE_LOCALE_TIME USE_PERLIO
USE_PERL_ATOF
  Locally applied patches:
Devel::PatchPerl 1.40
  Built under linux
  Compiled at Jan 18 2016 11:11:04
  %ENV:
PERL5LIB="/home/dhoworth/progs/modules"
PERLBREW_BASHRC_VERSION="0.74"
PERLBREW_HOME="/home/dhoworth/.perlbrew"
PERLBREW_MANPATH="/home/dhoworth/perl5/perlbrew/perls/perl-5.22.1/man"
PERLBREW_PATH="/home/dhoworth/perl5/perlbrew/bin:/home/dhoworth/perl5/perlbrew/perls/perl-5.22.1/bin"
PERLBREW_PERL="perl-5.22.1"
PERLBREW_ROOT="/home/dhoworth/perl5/perlbrew"
PERLBREW_VERSION="0.74"
PERLDOC_PAGER="vi"
  @INC:

Re: [Dbix-class] Errors installing DBIx::Class

2016-01-22 Thread Dave Howorth



On 2016-01-22 12:11, Dave Howorth wrote:
In the previous thread, Peter suggested I freeze the version of 
DBIx::Class until the code was updated to fix my problem. It's 
actually a new machine so it's not a question of reverting to the 
previous version but of finding a version that will install. I just tried


  cpanm DBIx::Class@0.08270

Unfortunately it failed the tests as did 0.08200 with similar errors. 
I'd appreciate any thoughts on how to get a working system.


I should add that I have installed cpanm into my perlbrew so I don't 
think it's seeing the wrong environment.


___
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


Re: [Dbix-class] Errors installing DBIx::Class

2016-01-22 Thread Dave Howorth



On 2016-01-22 12:24, Peter Rabbitson wrote:

On 01/22/2016 01:11 PM, Dave Howorth wrote:


because its perl is too old (5.10.1) for some of my code


5.10.1 is hardly "too old" :)


My usual fault is using perls and other software that are excruciatingly 
old, but in this case I'm porting a program that has use feature 
'unicode_strings' and I'd rather not reopen the festering sore that led 
to its use. :)


This is a harmless error, just ignore it. The test itself has been 
relegated to xt/ as it gives user-inactionable false negatives sometimes.


OK good.


#   Failed test 'Cascading delete on Ordered has_many works'
#   at t/60core.t line 362.
I am not sure - never seen this one. Perhaps try an older DBD::SQLite 
first (e.g. 1.37). It seems to be related to the ordering changes...


Thanks, that works. It seems to be 
https://rt.cpan.org/Public/Bug/Display.html?id=96499


Thanks again for all your help, my program is now running on the new 
machine.


Cheers, Dave

___
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


Re: [Dbix-class] Errors installing DBIx::Class

2016-01-22 Thread Dave Howorth



On 2016-01-22 14:18, Peter Rabbitson wrote:

On 01/22/2016 03:15 PM, Dave Howorth wrote:


Thanks, that works. It seems to be
https://rt.cpan.org/Public/Bug/Display.html?id=96499


Hah... indeed. I *completely* blanked out on this one, weird. Must be 
getting younger or something ;)


Yes, I've noticed that policemen have been getting younger for a few 
years, but now I've noticed that even dead people are getting younger ...


___
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


Re: [Dbix-class] updated release has broken my code

2016-01-21 Thread Dave Howorth



On 2016-01-20 18:21, Lasse Makholm wrote:

On Wed, Jan 20, 2016 at 4:32 PM, Dave Howorth <dhowo...@mrc-lmb.cam.ac.uk>
wrote:


I have various applications that use DBIx::Class. I just moved one of
them, which has been running OK for quite a while, to a new machine and
that meant it got a new environment, including an updated DBIx::Class. It
no longer runs, and it would help me to try to understand what is broken in
my own code if I could understand how the DBIC code works and why it was
changed. If anybody could give me any pointers, I'd be grateful.

My code is dying with the error message:

DBIx::Class::Row::store_column(): No such column '_type' on
TDB::Schema::Result::Node

This appears to be caused by a change in the code in DBIx::Class::Row in
store_column() in particular where

   $self->throw_exception( "No such column '${column}'" )
 unless exists $self->{_column_data}{$column} ||
$self->has_column($column);

has been replaced by

   $self->throw_exception( "No such column '${column}' on " . ref $self )
 unless exists $self->{_column_data}{$column} ||
$self->result_source->has_column($column);

If I put back the original code there, my application appears to work.

Now my TDB::Schema::Result::Node contains some gnarly code that it will
take me some time to regain familiarity with, and I think it would help me
if I understood why that change had been made in DBIx::Class::Row so I
might get some idea of what I need to change in my own code.

If anybody can point me to the change or provide any explanation, I'd
appreciate it.


https://github.com/dbsrgits/dbix-class/commit/4006691d207a6c257012c4b9a07d674b211349b0

Without knowing what I'm talking about, this would seem to only matter if
you do something funky like dynamically re-blessing result objects...

Does TDB::Schema::Result::Node and the underlying table actually have a
_type column?

/L


Many thanks Lasse,

The class is a virtual view. It's data comes from a union over a bunch 
of tables but yes it does have a _type column.


I've reproduced the commit log entry below. I obviously haven't had 
enough coffee this morning because I still haven't worked out what an 
'rsrc' is. And sadly I don't understand how the whole view/result 
source/result/row thing is implemented. I haven't found anything in the 
POD yet that shows me what I may have done wrong, so I guess I have some 
careful reading and code reading to come. I've reproduced the relevant 
bits of the class below as well in case anybody can spot a missing call 
or bad arguments etc.


Cheers, Dave

Avoid ResultSourceProxy calls whenever possible

Along with efficiency gains this commit makes a very subtle but crucially
important change: From here now on when we operate on an instance, we are
guaranteed to query this instance's result source. The previous codepaths
would nearly randomly switch between the current rsrc instance and the one
registered with the corresponding result class.



package TDB::Schema::Result::Node;

use parent 'DBIx::Class::Core';

__PACKAGE__->table_class('DBIx::Class::ResultSource::View');

__PACKAGE__->table('nodes');
__PACKAGE__->result_source_instance->is_virtual(1);

my $test_db_view =
   "SELECT
sp_id AS id,
sp_nameCOLLATE latin1_general_ci AS _name,
sp_comment COLLATE latin1_general_ci AS _comment,
sp_status  COLLATE latin1_general_ci AS status,
'species'  COLLATE latin1_general_ci AS _type,
old_sp_id  AS old_sunid,
pr_id  AS parent_id
FROM species
UNION ALL
... other similar selects for other tables ...
";

__PACKAGE__->result_source_instance->view_definition($test_db_view);

__PACKAGE__->add_columns(
id => {
data_type   => 'mediumint',
is_nullable => 0,
},
... other columns ...
_type => {
data_type   => 'text',
is_nullable => 0,
},
);

__PACKAGE__->set_primary_key('id');





Cheers, Dave

PS The old version says it is  '0.08200' and the new is '0.082820'.

___
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




___
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



___
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


Re: [Dbix-class] updated release has broken my code

2016-01-21 Thread Dave Howorth
I have a little more information now. It appears that the new version is 
checking against the columns of the underlying table from which the 
particular record happens to have been selected, rather than the columns 
of the virtual view. Since the columns have been renamed using AS in the 
SQL, that doesn't work, and in the case of this particular column, it is 
defined as a literal in the SQL anyway and doesn't exist in any 
underlying table.


That new behaviour seems broken in my use case, but I certainly don't 
understand enough about the other use cases that this change was 
designed to support to even begin to suggest how it might be fixed. In 
my case, it needs to check column definitions against those declared in 
my [virtual view] class, not against the columns in the underlying 
tables, which could be anything.


Should I file a bug report? I don't [yet] have a simple test case.

Apologies for top posting, it seems that this post sort of starts a new 
conversation, connected with my problem which is described just below.


Cheers, Dave

On 2016-01-21 11:03, Dave Howorth wrote:



On 2016-01-20 18:21, Lasse Makholm wrote:
On Wed, Jan 20, 2016 at 4:32 PM, Dave Howorth 
<dhowo...@mrc-lmb.cam.ac.uk>

wrote:


I have various applications that use DBIx::Class. I just moved one of
them, which has been running OK for quite a while, to a new machine and
that meant it got a new environment, including an updated 
DBIx::Class. It
no longer runs, and it would help me to try to understand what is 
broken in
my own code if I could understand how the DBIC code works and why it 
was

changed. If anybody could give me any pointers, I'd be grateful.

My code is dying with the error message:

DBIx::Class::Row::store_column(): No such column '_type' on
TDB::Schema::Result::Node

This appears to be caused by a change in the code in 
DBIx::Class::Row in

store_column() in particular where

   $self->throw_exception( "No such column '${column}'" )
 unless exists $self->{_column_data}{$column} ||
$self->has_column($column);

has been replaced by

   $self->throw_exception( "No such column '${column}' on " . ref 
$self )

 unless exists $self->{_column_data}{$column} ||
$self->result_source->has_column($column);

If I put back the original code there, my application appears to work.

Now my TDB::Schema::Result::Node contains some gnarly code that it will
take me some time to regain familiarity with, and I think it would 
help me

if I understood why that change had been made in DBIx::Class::Row so I
might get some idea of what I need to change in my own code.

If anybody can point me to the change or provide any explanation, I'd
appreciate it.

https://github.com/dbsrgits/dbix-class/commit/4006691d207a6c257012c4b9a07d674b211349b0 



Without knowing what I'm talking about, this would seem to only 
matter if

you do something funky like dynamically re-blessing result objects...

Does TDB::Schema::Result::Node and the underlying table actually have a
_type column?

/L


Many thanks Lasse,

The class is a virtual view. It's data comes from a union over a bunch 
of tables but yes it does have a _type column.


I've reproduced the commit log entry below. I obviously haven't had 
enough coffee this morning because I still haven't worked out what an 
'rsrc' is. And sadly I don't understand how the whole view/result 
source/result/row thing is implemented. I haven't found anything in 
the POD yet that shows me what I may have done wrong, so I guess I 
have some careful reading and code reading to come. I've reproduced 
the relevant bits of the class below as well in case anybody can spot 
a missing call or bad arguments etc.


Cheers, Dave

Avoid ResultSourceProxy calls whenever possible

Along with efficiency gains this commit makes a very subtle but crucially
important change: From here now on when we operate on an instance, we are
guaranteed to query this instance's result source. The previous codepaths
would nearly randomly switch between the current rsrc instance and the 
one

registered with the corresponding result class.



package TDB::Schema::Result::Node;

use parent 'DBIx::Class::Core';

__PACKAGE__->table_class('DBIx::Class::ResultSource::View');

__PACKAGE__->table('nodes');
__PACKAGE__->result_source_instance->is_virtual(1);

my $test_db_view =
   "SELECT
sp_id AS id,
sp_nameCOLLATE latin1_general_ci AS _name,
sp_comment COLLATE latin1_general_ci AS _comment,
sp_status  COLLATE latin1_general_ci AS status,
'species'  COLLATE latin1_general_ci AS _type,
old_sp_id  AS old_sunid,
pr_id  AS parent_id
FROM species
UNION ALL
... other similar selects for other tables ...
";

__PACKAGE__->result_source_instance->view_definition($test_db_view);

__PACKAGE__->add_columns(
id => {
data_type   => 'mediumint',
is_nullable => 0,
},

[Dbix-class] updated release has broken my code

2016-01-20 Thread Dave Howorth
I have various applications that use DBIx::Class. I just moved one of 
them, which has been running OK for quite a while, to a new machine and 
that meant it got a new environment, including an updated DBIx::Class. 
It no longer runs, and it would help me to try to understand what is 
broken in my own code if I could understand how the DBIC code works and 
why it was changed. If anybody could give me any pointers, I'd be grateful.


My code is dying with the error message:

DBIx::Class::Row::store_column(): No such column '_type' on 
TDB::Schema::Result::Node


This appears to be caused by a change in the code in DBIx::Class::Row in 
store_column() in particular where


  $self->throw_exception( "No such column '${column}'" )
unless exists $self->{_column_data}{$column} || 
$self->has_column($column);


has been replaced by

  $self->throw_exception( "No such column '${column}' on " . ref $self )
unless exists $self->{_column_data}{$column} || 
$self->result_source->has_column($column);


If I put back the original code there, my application appears to work.

Now my TDB::Schema::Result::Node contains some gnarly code that it will 
take me some time to regain familiarity with, and I think it would help 
me if I understood why that change had been made in DBIx::Class::Row so 
I might get some idea of what I need to change in my own code.


If anybody can point me to the change or provide any explanation, I'd 
appreciate it.


Cheers, Dave

PS The old version says it is  '0.08200' and the new is '0.082820'.

___
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] Use of uninitialized value $mysql_ver in numeric lt

2015-08-07 Thread Dave Howorth
I'm just trying to run an old program on a new machine and it is
throwing this error:

Use of uninitialized value $mysql_ver in numeric lt () at
/usr/local/share/perl5/DBIx/Class/Storage/DBI/mysql.pm line 117,
$__ANONIO__ line 3.

I've found

https://rt.cpan.org/Public/Bug/Display.html?id=81979

but that says the bug was fixed over two years ago in 0.08204. I have

# cpanm DBIx::Class
DBIx::Class is up to date. (0.082820)

So I thought I'd ask here before I do a lot of investigation. Hopefully
somebody will have an idea of what is going on :)

Thanks, Dave

___
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


Re: [Dbix-class] Strange statistically significant failure for DBIC with Sybase

2014-02-04 Thread Dave Howorth
Phillip Moore wrote:
 I'm using DBIC 0.08250 with DBD-Sybase 1.14 (both are a tad out of date;
 I've requested upgrades, which sadly I no longer control) against a Sybase
 ASE 12.5.4 server.

Before spending too much time looking for the cause, is it possible to
build a test system with up-to-date versions to make sure the problem
hasn't already gone away?

If you did manage to make a reproducible test case, that could be
installed on an isolated system (not subject to strict version control)
or maybe you could put local up-to-date versions on your existing
hardware without needing admin wheels to turn?

___
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] Multiple connections

2014-01-16 Thread Dave Howorth
Is there a good (authoritative?) description of how DBIx::Class manages
database connections? Including whatever is done by other packages
underneath.

I think I need to make two connections to the same MySQL database with
different settings of the mysql_enable_utf8 option. But calling
connection twice seems to result in a single connection.

Thanks, Dave

___
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


Re: [Dbix-class] Multiple connections

2014-01-16 Thread Dave Howorth
Hernan Lopes wrote:
 i guess you are using catalyst dbix models.

No I'm not using Catalyst. I want to make two connections to the same
database in the same application. My question was correct, I think.

___
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


Re: [Dbix-class] Multiple connections

2014-01-16 Thread Dave Howorth
Peter Rabbitson wrote:
 On Thu, Jan 16, 2014 at 11:06:14AM +, Dave Howorth wrote:
 I think I need to make two connections to the same MySQL database with
 different settings of the mysql_enable_utf8 option. But calling
 connection twice seems to result in a single connection.
 
 connection() is not a proper way to connect to a database. See the 
 source of connect() [1] for the immediatelly obvious answer (and by 
 proxy an explanation of the problem you are experiencing).

Ah ha! Thank you, thank you.

 Please let us know what made you use connection() as opposed to 
 connect() - clearly the docs need adjusting.

Whatever it was is a long time ago and lost in the fog, sorry. I
migrated from CDBI, if that might account for it.

Cheers, Dave

___
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


Re: [Dbix-class] Multiple connections

2014-01-16 Thread Dave Howorth
Lianna Eeftinck wrote:
 Just curious, why would you want to make two connections to the same
 database with only a difference in the mysql_enable_utf8 option? It is
 generally a bad idea to open more than one connection to a database because
 you might find updates in one are not showing up straight away in the
 other, such as when transactions are involved. It also takes more resources
 on both sides.

It's read-only access to this database, so there's no risk, and I don't
think two connections rather than one is likely to lead to a resource
problem.

 UTF8 and string encoding options can probably be handled in other ways from
 one and the same connection.

I'm open to any suggestions, but for now it looks like the
two-connection approach solves my problem.

Cheers, Dave

PS Thanks to everybody else who replied.

___
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


Re: [Dbix-class] Multiple connections

2014-01-16 Thread Dave Howorth
Dave Howorth wrote:
 Peter Rabbitson wrote:
 On Thu, Jan 16, 2014 at 11:06:14AM +, Dave Howorth wrote:
 I think I need to make two connections to the same MySQL database with
 different settings of the mysql_enable_utf8 option. But calling
 connection twice seems to result in a single connection.
 connection() is not a proper way to connect to a database. See the 
 source of connect() [1] for the immediatelly obvious answer (and by 
 proxy an explanation of the problem you are experiencing).
 
 Ah ha! Thank you, thank you.

Apparently I still don't understand enough to use this effectively. If I do

my $schemaw = TDB::Schema-connect($dsn, $user, $password);

$dbi_params = {
mysql_enable_utf8 = 1,
on_connect_do = SET NAMES 'utf8',
};

my $schemau = TDB::Schema-connect($dsn, $user, $password,
   $dbi_params);

things work, but I don't have the dsn etc immediately available in the
place where I need to make the second call and if I replace the second
connect with

my $schemau = $schemaw-clone($dbi_params);

things don't work. Is there some way to use clone? Or is there some way
to retrieve the connection info so I can reuse it?

I suppose I'm still interested in the answer to my original question:

Is there a good (authoritative?) description of how DBIx::Class manages
database connections? Including whatever is done by other packages
underneath.

 Please let us know what made you use connection() as opposed to 
 connect() - clearly the docs need adjusting.
 
 Whatever it was is a long time ago and lost in the fog, sorry. I
 migrated from CDBI, if that might account for it.

Actually I've just noted a couple of places, both in
DBIx::Class::Manual::Cookbook

The first occurrence of the text 'connect' on the page is in the example
'Test File test.pl'

my $schema = My::Schema-connection('dbi:Pg:dbname=test');

and then in the section I was actually using:

MySQL

MySQL supports unicode, and will correctly flag utf8 data from the
database if the mysql_enable_utf8 is set in the connect options.

  my $schema = My::Schema-connection('dbi:mysql:dbname=test',
  $user, $pass,
  { mysql_enable_utf8 = 1} );

Cheers, Dave

___
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


Re: [Dbix-class] Multiple connections

2014-01-16 Thread Dave Howorth
Lianna Eeftinck wrote:
 I'm open to any suggestions, but for now it looks like the
 two-connection approach solves my problem.
 
 You never stated the problem you are trying to tackle with the two
 connections. :)

You're right. I want to read data from a MySQL database where some
tables use Windows-1252 encoding (i.e what MySQL refers to as latin1)
and others use UTF8.

 On 16 January 2014 14:23, Dave Howorth dhowo...@mrc-lmb.cam.ac.uk wrote:
 
 Lianna Eeftinck wrote:
[snip]
 UTF8 and string encoding options can probably be handled in other ways
 from
 one and the same connection.
 I'm open to any suggestions, but for now it looks like the
 two-connection approach solves my problem.

___
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


Re: [Dbix-class] Multiple connections

2014-01-16 Thread Dave Howorth
Bill Moseley wrote:
 On Thu, Jan 16, 2014 at 7:25 AM, Dave Howorth 
 dhowo...@mrc-lmb.cam.ac.ukwrote:
 You're right. I want to read data from a MySQL database where some
 tables use Windows-1252 encoding (i.e what MySQL refers to as latin1)
 and others use UTF8.
 
 It's not latin1.   There's a few differences:

I know, but that's what MySQL calls it, erroneously.

 How are you going to join across those two database handles?

I'm not. There's no need.

 Dave, I know it sounds like a lot of work, but fix your data.

I would if it was my data!


___
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


Re: [Dbix-class] Multiple connections

2014-01-16 Thread Dave Howorth
Lianna Eeftinck wrote:
 Afaik, 'mysql_enable_utf8 = 1' (and there are similar options for
 Postgress and SQLite at least) just tells the mysql driver that if a column
 is marked as having a UTF8 charset in the table, it'll try to return the
 data as such. If your column has a different character set the option won't
 do much, nor would it be active if your data isn't marked UTF8 or not
 inserted as UTF8 properly.

The option changes the mysql connection protocol. When I try to retrieve
the so-called latin1 data using a utf8 connection, I get:

DBIx::Class::ResultSet::find(): DBI Exception: DBD::mysql::st execute
failed: COLLATION 'latin1_general_ci' is not valid for CHARACTER SET 'utf8'

If you know how to avoid that, I'd be very happy to learn.

 You certainly don't need two database handles to solve this problem. The
 difficulty lies in making sure you're converting the right character data
 to the right character data, no matter where you do this (you can do it in
 the database itself just as well). Two database handles won't make that bit
 any easier.

You'd have to back that assertion up with some detail (working code, for
example) for me to believe it :)

I think I already mentioned that the database is read-only.

___
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


Re: [Dbix-class] Multiple connections

2014-01-16 Thread Dave Howorth
Dave Howorth wrote:
 Apparently I still don't understand enough to use this effectively. If I do
 
 my $schemaw = TDB::Schema-connect($dsn, $user, $password);
 
 $dbi_params = {
 mysql_enable_utf8 = 1,
 on_connect_do = SET NAMES 'utf8',
 };
 
 my $schemau = TDB::Schema-connect($dsn, $user, $password,
$dbi_params);
 
 things work, but I don't have the dsn etc immediately available in the
 place where I need to make the second call and if I replace the second
 connect with
 
 my $schemau = $schemaw-clone($dbi_params);
 
 things don't work. Is there some way to use clone? Or is there some way
 to retrieve the connection info so I can reuse it?

So by reading the code, I discovered that it is possible to call
connect_info with no argument and get the current info in return, at
least for DBIx::Class::Storage::DBI. If I do that, then I can haz
working kode.

However, AFAICT the docs do not describe this use case for
connect_info(). The docs don't seem to mention a return value at all. So
am I safe in using it this way, or may it break in the future?

 I suppose I'm still interested in the answer to my original question:
 
 Is there a good (authoritative?) description of how DBIx::Class manages
 database connections? Including whatever is done by other packages
 underneath.

___
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] Unicode woes

2014-01-08 Thread Dave Howorth
I'm having some grief with Unicode. There's a MySQL database with a
table that contains a text column with Unicode values. When I read those
values with DBIx::Class they emerge as Windows-1252 and I'm going mad in
the twisty little passages trying to find whatever it is I need to
change to get at the original Unicode values.

The DDL for the table is like this:

DROP TABLE IF EXISTS `text_for_pages`;
CREATE TABLE `text_for_pages` (
  `page` text NOT NULL,
  `keytext` text NOT NULL,
  `value` text,
  PRIMARY KEY (`page`(30),`keytext`(30))
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

I believe the values of the 'value' column really are Unicode because if
I execute a command like:

  mysql -e 'use mydb; select * from text_for_pages \
  where page = page-name'  dump.txt

and then examine dump.txt with 'od', I can see the two-byte Unicode
sequences I expect. (non-breaking spaces, left and right quotes).

But when I run my DBIC program and dump the value, I see single-byte
characters such as \xA0, \x91, \x92 which I believe are Windows-1252.

At connection time, I presently set a couple of options:

  {
mysql_enable_utf8 = 1,
on_connect_do = SET NAMES 'utf8',
  };

I'm not sure what I should be doing differently?

Cheers, Dave

___
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


Re: [Dbix-class] Unicode woes

2014-01-08 Thread Dave Howorth
Patrick Meidl wrote:
 On Wed, Jan 08 2014, Dave Howorth dhowo...@mrc-lmb.cam.ac.uk wrote:
 
 But when I run my DBIC program and dump the value, I see single-byte
 characters such as \xA0, \x91, \x92 which I believe are Windows-1252.
 
 two things I can think of:
 
 - do your Result classes 'use utf8'?

No, but I don't have any Unicode strings in my source.

 - when you dump the data (write to file), are you using an utf8
   filehandle? e.g.
   
 use open :encoding(utf8);
 
   or
 
 binmode(OUT, :utf8);

Doh! Also no, and as soon as I do the dump file has Unicode byte
sequences in it. Thank you!

So it looks like all I need to do now is figure out how to tell
Template::Toolkit to do that when it sees Unicode data.

 other than that, I found this page quite informative:
 
 http://mysql.rjweb.org/doc.php/charcoll

Thanks, I'll have a read of that as well.

Cheers, Dave

 HTH
 
 patrick


___
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


Re: [Dbix-class] where does Main come from?

2013-09-05 Thread Dave Howorth
Peter Rabbitson wrote:
 On Mon, Sep 02, 2013 at 03:39:14PM +0100, Dave Howorth wrote:
 I'm just looking at DBIx::Class::Manual::Example

 It starts out by setting up a database and then goes on to 'Set up
 DBIx::Class::Schema' and all of a sudden it is creating a subdirectory
 called Main.

 Why? Where did that come from? It's supposed to be a simple example, so
 presumably there's a pretty important reason why this directory appears
 out of nowhere.

 Why is there no explanation of why we need that extra level of
 directory? Why is it called Main instead of Schema?

 
 This was fixed just last week by [1]. Please read tne new version of the 
 PODs here [2] and here [3] and let us know if more changes would be 
 necessary.

Thanks in advance, as it were :)

Will do. Cheers, Dave

 Cheers
 
 
 [1] https://github.com/dbsrgits/dbix-class/commit/a5bd5d88
 [2] 
 https://github.com/dbsrgits/dbix-class/blob/master/lib/DBIx/Class/Manual/QuickStart.pod
 [3] 
 https://github.com/dbsrgits/dbix-class/blob/master/lib/DBIx/Class/Manual/Example.pod
 
 ___
 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
 


___
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


Re: [Dbix-class] where does Main come from?

2013-09-05 Thread Dave Howorth
Hailin Hu wrote:
 It seems that you already knew Main is the level representing Schema,
 so what's the problem?

The point is that the example is aimed at the complete noob, and by
definition they do NOT know things like this. I noticed it because it's
been a while since I created a little app from scratch and had toscratch
my head for a while when I got to that step.

 Maybe you prefer MyApp::Schema::ResultSet::*, but it is just a name,
 isn't it? You can change it as you like.

That entirely misses the point of the example.

 Cheers
 
 On Mon, Sep 2, 2013 at 11:39 PM, Dave Howorth
 dhowo...@mrc-lmb.cam.ac.uk wrote:
 I'm just looking at DBIx::Class::Manual::Example

 It starts out by setting up a database and then goes on to 'Set up
 DBIx::Class::Schema' and all of a sudden it is creating a subdirectory
 called Main.

 Why? Where did that come from? It's supposed to be a simple example, so
 presumably there's a pretty important reason why this directory appears
 out of nowhere.

 Why is there no explanation of why we need that extra level of
 directory? Why is it called Main instead of Schema?

 Cheers, Dave

 ___
 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
 
 ___
 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
 


___
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] where does Main come from?

2013-09-02 Thread Dave Howorth
I'm just looking at DBIx::Class::Manual::Example

It starts out by setting up a database and then goes on to 'Set up
DBIx::Class::Schema' and all of a sudden it is creating a subdirectory
called Main.

Why? Where did that come from? It's supposed to be a simple example, so
presumably there's a pretty important reason why this directory appears
out of nowhere.

Why is there no explanation of why we need that extra level of
directory? Why is it called Main instead of Schema?

Cheers, Dave

___
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


Re: [Dbix-class] Representing directory structures

2013-04-08 Thread Dave Howorth
Bill Moseley wrote:
 Anyone using DBIC to represent hierarchal directory (folder) structures?
 
 Essentially just like a file system, except users each have their own root.
  To add to the complexity, I need to be able to share folders and all
 child elements to other users.

Just a thought, and most likely irrelevant to your application, but file
system hierarchies are frequently a poor match to the users'
requirements. The user would often really prefer multiple parents (i.e.
a DAG) and/or classification tags for 'files'. Those features would lead
to a different implementation.

Cheers, Dave

___
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


Re: [Dbix-class] Re: DBIx::Class with ODBC

2013-02-06 Thread Dave Howorth
stephenmoy wrote:
 I appreciate the help up to this point, but still haven't got this working. 
 Any other ideas?

I haven't seen your reply to

Peter Rabbitson wrote:
 On Fri, Jan 25, 2013 at 06:05:44AM -0800, stephenmoy wrote:
 produces the DBIx::Class::ResultSet::search(): DBI Exception:
 DBD::ODBC::db get_info failed: [Ingres][Ingres ODBC
 Driver]Information type out of range (SQL-HY096) error.

 Right, and I was asking if you can debug *which* part of the code
 throws this exception - you should have seen the other output first,
 but apparently something is broken somewhere. Even just running the
 above under DBIC_TRACE=1 should help (this will turn on full
 stacktracing).

___
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


Re: [Dbix-class] Re: DBIx::Class with ODBC

2013-01-25 Thread Dave Howorth
stephenmoy wrote:
 DBIC_TRACE=1 generates this:
 Undefined subroutine Carp::longmess_heavy called at
 /usr/lib/perl5/5.8.8/Carp.pm line 239.
 
 In addition - what limit dialect does Ingress support? Is
 it any of the already implemented ones [1] ? Note - we need limit *and*
 offset support, limit alone won't cut it. 
 
 Ingres seems to support OFFSET only.

FIRST ?

___
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


Re: [Dbix-class] exception_action fail after DBIC upgrade

2013-01-22 Thread Dave Howorth
Peter Rabbitson wrote:
 Yes, except that it is a flawed assumption that folks check for 
 truthiness of $@. In fact any code that does this (if ($@) { ... }) is 
 arguably wrong. The only correct way to check for an exception is (if 
 ($@ eq '') { ... } ) after an eval just took place.

So the official examples are [arguably] wrong then ... ? :)

http://perldoc.perl.org/functions/eval.html


___
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


Re: [Dbix-class] coercing Result objects

2012-11-26 Thread Dave Howorth
Aaron Trevena wrote:
 This sounds like the problem that this recipe in the cookbook tries to
 solve : 
 http://search.cpan.org/~getty/DBIx-Class-0.08204/lib/DBIx/Class/Manual/Cookbook.pod#Dynamic_Sub-classing_DBIx::Class_proxy_classes

Hi Aaron,

Thanks for taking a look. It's a similar problem but I don't think it's
quite the same. I discovered that the prototype code I posted worked
pretty much straight away, so I've just implemented a method like that
in each class. All the squirly little differences between the individual
tables make it difficult for me to think there's going to be a general
solution, so I've moved on to other things.

 This is something I'm looking at myself (search results spanning
 tables via a big union ( DBIx::Class::Helpers has a helper for that
 too btw)
 
 I might not fully understand what you're doing, hopefully that's some help 
 tho.

Yeah, the big union is a very useful feature for my situation. I'm glad
I discovered it on this list ages ago :)

Cheers, Dave

___
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


Re: [Dbix-class] coercing Result objects

2012-11-26 Thread Dave Howorth
Ben Tilly wrote:
 On Mon, Nov 26, 2012 at 1:29 AM, Aaron Trevena aaron.trev...@gmail.com 
 wrote:
 On 13 November 2012 14:55, Dave Howorth dhowo...@mrc-lmb.cam.ac.uk wrote:
 [...]
 This is something I'm looking at myself (search results spanning
 tables via a big union ( DBIx::Class::Helpers has a helper for that
 too btw)
 
 Random tip in case you don't know it.  A union has an implicit dedupe
 in it, which is quite expensive.  If ou can, you really want to make
 that a UNION ALL instead.
 
 (Database people all know this, developers generally don't.)

Ooh, shiny! Thanks, I didn't know that.

Cheers, Dave

___
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


Re: [Dbix-class] 0.08202_01

2012-10-15 Thread Dave Howorth
fREW Schmidt wrote:
 Hello All,
 
 I've just shipped a dev rel that fixes the menagerie of fun issues we
 got with the previous release and SQLite on various configurations. 
 Assuming we don't get black smoke in the next day or two there will be a
 new release soon.

Should I be able to see some changes in
https://rt.cpan.org/Public/Dist/Display.html?Name=DBIx-Class
to understand what has been changed?
It doesn't seem to have been updated recently.

___
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


Re: [Dbix-class] DBIx::Class 0.08918 install fails? Was: Undefined subroutine DBIx::Class::Exception::catch

2012-09-17 Thread Dave Howorth
fREW Schmidt wrote:
 It's been fixed in git already in a branch, we just haven't been able to
 release it yet.  Sorry for the radio silence.
 On Sep 10, 2012 10:47 AM, Dave Howorth dhowo...@mrc-lmb.cam.ac.uk wrote:

Thanks for the update. FWIW, when I applied the patch listed in the bug
report this time, I actually read it. AFAICT, it makes the test pass in
the circumstance where the test was broken but may fail in other
circumstances. I don't know what the fix in git is and I've now moved on
to fixing other things that got broken by the upgrade.

Cheers, Dave

___
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


Re: [Dbix-class] DBIx::Class 0.08918 install fails? Was: Undefined subroutine DBIx::Class::Exception::catch

2012-09-10 Thread Dave Howorth
Dave Howorth wrote:
 Bill Moseley wrote:
 On Wed, Aug 15, 2012 at 7:23 AM, Dave Howorth 
 dhowo...@mrc-lmb.cam.ac.ukwrote:
 DBIx::Class fails to install (see below).

 HI Dave,

 I had good luck with this version.  Might be worth a try since it's an easy
 test.
 
 Thanks for the suggestion. I had found that these test failures were
 already reported [1] together with a suggested patch. So I applied the
 patch and then it installed cleanly. Hopefully there'll be another
 release soon.

So I just upgraded Ubuntu on this machine and as a consequence am
reinstalling the perl modules for the upgraded perl and I discover this
issue is still broken in FREW/DBIx-Class-0.08200.tar.gz

I can patch it again, but I'm surprised there hasn't been a release to
fix the broken install given how much time has elapsed?

___
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] Undefined subroutine DBIx::Class::Exception::catch

2012-08-15 Thread Dave Howorth
Has anybody seen this eror message before?

  Undefined subroutine DBIx::Class::Exception::catch

All my programs that use DBIx::Class on a particular machine have just
broken and now die with that error message.

The reason is undoubtedly connected with some module upgrades I
performed yesterday. I was trying to install a module with a lot of
dependencies (GraphViz2) and though I ultimately aborted the install
because of a perl version dependency, there were a lot of other modules
upgraded and indeed new modules installed as part of the dependencies.

So I'm pretty sure that there's now some version conflict, but given how
many modules were touched, I suspect it will take me a while to track
down. If anybody recognizes the source of the error, I'd appreciate a
pointer.

FWIW, I just went to the DBIx::Class build directory and ran

  make
  make test

make apparently completed OK. make test produces lots of results like
this random example:

t/storage/disable_sth_caching.t .. Undefined subroutine
DBIx::Class::Exception::catch called at
/root/.cpan/build/DBIx-Class-0.08124-HpDxQQ/blib/lib/DBIx/Class/Exception.pm
line 58.
Compilation failed in require at t/lib/DBICTest.pm line 7.
BEGIN failed--compilation aborted at t/lib/DBICTest.pm line 7.
Compilation failed in require at t/storage/disable_sth_caching.t line 6.
BEGIN failed--compilation aborted at t/storage/disable_sth_caching.t line 6.
t/storage/disable_sth_caching.t .. Dubious, test
returned 255 (wstat 65280, 0xff00)
No subtests run


Thanks, Dave

___
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


Re: [Dbix-class] DBIx::Class 0.08918 install fails? Was: Undefined subroutine DBIx::Class::Exception::catch

2012-08-15 Thread Dave Howorth
Dave Howorth wrote:
 Has anybody seen this eror message before?
 
   Undefined subroutine DBIx::Class::Exception::catch
 
 All my programs that use DBIx::Class on a particular machine have just
 broken and now die with that error message.

So after spending a fruitless few hours looking for the presumed
incompatibility (backward regression?), I decided it wasn't worth
spending any more time on and that I'd try to resolve the problem by
upgrading. But DBIx::Class fails to install (see below).

I see some people are having trouble using 0.08198. But is anybody
seeing failures on install?

Again, any suggestions on how to get this system working again would be
be greatly appreciated.

Cheers, Dave

[snip of successful tests]
t/storage/on_connect_do.t  ok
t/storage/ping_count.t ... ok
t/storage/quote_names.t .. ok
t/storage/reconnect.t  1/?
#   Failed test 'The operation succeeded'
#   at t/storage/reconnect.t line 69.
# died: DBIx::Class::Exception (DBIx::Class::ResultSet::search(): DBI
Exception: DBD::SQLite::db prepare_cached failed: disk I/O error [for
Statement SELECT me.artistid, me.name, me.rank, me.charfield FROM
artist me ORDER BY name DESC] at t/storage/reconnect.t line 68
# )

#   Failed test 'Three artists returned'
#   at t/storage/reconnect.t line 70.
#  got: 0
# expected: 3
# Looks like you failed 2 tests of 36.
t/storage/reconnect.t  Dubious, test
returned 2 (wstat 512, 0x200)
Failed 2/36 subtests
t/storage/replicated.t ... skipped: Test needs
MooseX::Types = 0.21
t/storage/source_bind_compat.t ... ok
t/storage/stats.t  ok
t/storage/txn.t .. ok
t/storage/txn_scope_guard.t .. ok
t/update/all.t ... ok
t/update/ident_cond.t  ok
t/update/type_aware.t  ok
t/zzz_perl_perf_bug.t  ok
t/zzz_sqlite_deadlock.t .. skipped: Skipping
test on plain module install

Test Summary Report
---
t/52leaks.t(Wstat: 0 Tests: 197
Failed: 0)
  TODO passed:   149
t/multi_create/existing_in_chain.t (Wstat: 0 Tests: 10
Failed: 0)
  TODO passed:   1-2, 5-6, 10
t/multi_create/reentrance_count.t  (Wstat: 0 Tests: 18
Failed: 0)
  TODO passed:   1-4, 6-10, 12, 15-16, 18
t/prefetch/via_search_related.t(Wstat: 0 Tests: 24
Failed: 0)
  TODO passed:   21-22
t/row/inflate_result.t (Wstat: 0 Tests: 12
Failed: 0)
  TODO passed:   3
t/storage/reconnect.t  (Wstat: 512 Tests: 36
Failed: 2)
  Failed tests:  5-6
  Non-zero exit status: 2
Files=279, Tests=20205, 325 wallclock secs ( 8.88 usr  2.04 sys + 269.56
cusr 18.32 csys = 298.80 CPU)
Result: FAIL
Failed 1/279 test programs. 2/20205 subtests failed.
make: *** [test_dynamic] Error 255
  FREW/DBIx-Class-0.08198.tar.gz
  /usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
  reports FREW/DBIx-Class-0.08198.tar.gz
Running make install
  make test had returned bad status, won't install without force
Failed during this command:
 FREW/DBIx-Class-0.08198.tar.gz   : make_test NO

cpan[2]

___
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


Re: [Dbix-class] DBIx::Class 0.08918 install fails? Was: Undefined subroutine DBIx::Class::Exception::catch

2012-08-15 Thread Dave Howorth
Bill Moseley wrote:
 On Wed, Aug 15, 2012 at 7:23 AM, Dave Howorth 
 dhowo...@mrc-lmb.cam.ac.ukwrote:
 
 Dave Howorth wrote:
 Has anybody seen this eror message before?

   Undefined subroutine DBIx::Class::Exception::catch

 All my programs that use DBIx::Class on a particular machine have just
 broken and now die with that error message.
 So after spending a fruitless few hours looking for the presumed
 incompatibility (backward regression?), I decided it wasn't worth
 spending any more time on and that I'd try to resolve the problem by
 upgrading. But DBIx::Class fails to install (see below).

 
 HI Dave,
 
 I had good luck with this version.  Might be worth a try since it's an easy
 test.

Thanks for the suggestion. I had found that these test failures were
already reported [1] together with a suggested patch. So I applied the
patch and then it installed cleanly. Hopefully there'll be another
release soon.

The new version, or more probably one of the dependency upgrades, also
fixed the machine so my programs work again. So I'm just left with an
unexplained mystery as to exactly what the problem was. C'est la vie.

Cheers, Dave

[1] https://rt.cpan.org/Public/Bug/Display.html?id=78420

___
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


Re: [Dbix-class] many_to_many data access

2012-07-13 Thread Dave Howorth
Patrick Meidl wrote:

 there are two reasons why you want to model the relationship city -
 state - country in such a rigid (and maybe simplified) way:
 
 first, it helps you maintain data integrity. after all, you don't want
 anybody to enter a store which is in Paris, Bavaria, UK, right?

But you do want them to be able to enter Paris, France as well as Paris,
Texas, USA. :-P  And in Germany, the state (Land) is not part of the
address, AFAIK, so Bavaria, or Freistaat Bayern, will never appear. And
it's most definitely not right to have to write Singapore, Singapore,
Singapore as an address. So I think some more flexibility is required,
as others have suggested.

Cheers, Dave

___
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


Re: [Dbix-class] How to

2012-06-19 Thread Dave Howorth
Hardik Joshi wrote:
 Thanks Alex,
 
 I have tried 'SELECT...FOR UPDATE' with normal DBI module and its working
 well where as via DBIx::Class its not working as per requirement.

I don't understand. The code you said you had tried was doing an INSERT,
not an UPDATE. So how is SELECT...FOR UPDATE relevant or working in DBI?

 So, I feel I might missing something in DBIx::Class. do you have any idea
 for that?


___
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


Re: [Dbix-class] How to

2012-06-19 Thread Dave Howorth
Hardik Joshi wrote:
 I am posting my code for dbi and dbix here please have a look.
 
 * DBI here AutoCommit = 0
 
 my $dbh = DBI-connect($dsn, $user, $password,
   { RaiseError = 1, AutoCommit = 0 });
 my $sel_sql = qq{select * from test where id = 1 for update};
 my $rs = $dbh-selectrow_array($sel_sql);
 sleep(10);
 my $ins_sql = qq{insert into test(value1, value2) values(10.10,20.1)};
 my $sth = $dbh-prepare($ins_sql);
 $sth-execute();
 $dbh-commit();
 $dbh-disconnect();
 
 
 * DBIx here AutoCommit = 0
 
 my $schema = DB::Model::test-new();
 my $rs = $schema-resultset('Test');
 my $test_res = $rs-search( { 'id' = 1 }, { 'for' = 'update' } )-first();
 sleep(10);
 $rs-create({value1 = 10.45, value2 = 20.70});
 $schema-storage-txn_commit();
 
 
 here sleep(10) will hold execution for 10 second so meanwhile you can
 execute same script from other terminal to generate the scenario.

I think you will find that DBIC has not issued any database commands
when you call sleep. i.e. it has not started a transaction. So your code
is not generating the race condition you think it is. As Hailin
suggested, run with DBIC_TRACE=1. You need to actually fetch some data
before you sleep.

I still don't understand the UPDATE vs INSERT issue.

___
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


Re: [Dbix-class] How to

2012-06-19 Thread Dave Howorth
Joerg Braun wrote:
 On Tue, 19 Jun 2012 10:26:19 +0100, Dave Howorth
 I still don't understand the UPDATE vs INSERT issue.

 In his first mail he told us that a user has to seelct a minimum value from
 some table. That has to be valid until the insert committed. He wants to
 avoid a second user in receiving the same minimum value.
 
 His idea was to lock the table for reading until the insert is done, which
 would create a new minimum value.

SELECT FOR UPDATE locks for UPDATE, not for INSERT, according to the manual.

___
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


Re: [Dbix-class] changing view definition

2012-05-24 Thread Dave Howorth
I wrote:
 Is it possible to change the definition of a
 DBIx::Class::ResultSource::View based on the particular database to
 which a connection is made?
 
 I have a result class that is a union of several tables. Unfortunately,
 I now have another database to which I must connect that has an
 additional table needing to be included in the union. Is it possible to
 do this by connecting to the database and then changing the result class
 somehow to use the expanded union?
 
 My class initializes with:
 
 __PACKAGE__-result_source_instance-is_virtual(1);
 __PACKAGE__-result_source_instance-view_definition($my_select_union_sql);
 
 I've tried adding a call later, once I know which database is in use:
 
 __PACKAGE__-result_source_instance-view_definition($my_new_select_union_sql);
 
 but DBIC still uses the original select SQL when querying the database.
 
 Is there some other way of changing the definition of the view?

OK, so I have a tentative answer.

Accessing __PACKAGE__-result_source_instance seems to have no effect
once things have been set up, because 'magic' stashes the instance away.
To find it again, you have to go through a resultset or the schema, and
an invocation like:

  $result_set-result_source-view_definition($my_new_select_union_sql);

appears to have the desired effect of changing the view definition.

If anybody can confirm that this is OK, or warn me that evil things will
happen, I'd appreciate it.

I still find it hard to get my head around the structure of DBIx::Class :(

Cheers, Dave

___
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] changing view definition

2012-05-18 Thread Dave Howorth
Is it possible to change the definition of a
DBIx::Class::ResultSource::View based on the particular database to
which a connection is made?

I have a result class that is a union of several tables. Unfortunately,
I now have another database to which I must connect that has an
additional table needing to be included in the union. Is it possible to
do this by connecting to the database and then changing the result class
somehow to use the expanded union?

My class initializes with:

__PACKAGE__-result_source_instance-is_virtual(1);
__PACKAGE__-result_source_instance-view_definition($my_select_union_sql);

I've tried adding a call later, once I know which database is in use:

__PACKAGE__-result_source_instance-view_definition($my_new_select_union_sql);

but DBIC still uses the original select SQL when querying the database.

Is there some other way of changing the definition of the view?

Thanks, Dave

___
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] schema - dsn?

2012-05-10 Thread Dave Howorth
This has to be a dumb question but I haven't found the answer yet ...

Given a resultset or schema object, how do I find the DSN to which it is
connected? (or equivalent information about host  database name etc)

TIA, Dave

___
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


Re: [Dbix-class] schema - dsn?

2012-05-10 Thread Dave Howorth
Patrick Meidl wrote:
 On Thu, May 10 2012, Dave Howorth dhowo...@mrc-lmb.cam.ac.uk wrote:
 
 Given a resultset or schema object, how do I find the DSN to which it
 is connected? (or equivalent information about host  database name
 etc)
 
 $schema-storage-connect_info-{dsn};
 $rs-result_source-storage-connect_info-{dsn};

Thanks, yes that was enough. In my system connect_info returns an
arrayref rather than a hashref, but it has the dsn as element 0.

I had read the description of connect_info at
http://search.cpan.org/~arodland/DBIx-Class-0.08196/lib/DBIx/Class/Storage/DBI.pm#connect_info
but from that I got the impression that it was a mutator method rather
than an accessor. It says nothing about a return value. I had decided it
would be dangerous to try calling that.

So thanks very much for the pointer :)

Dave

___
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


Re: [Dbix-class] Consistent column name aliasing?

2012-04-02 Thread Dave Howorth
Alexander Hartmaier wrote:
 The accessor is only used to create the object accessors, search has
 always used the column names and not the accessor names.

Using views may help:

  __PACKAGE__-table('Artists');
  __PACKAGE__-result_source_instance-is_virtual(1);
  __PACKAGE__-result_source_instance-view_definition(...

Cheers, Dave

___
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


Re: [Dbix-class] Regarding Oracle's 1000 element limit in IN clause

2011-10-24 Thread Dave Howorth
There's another possibility that might be usable, which is to transform
the query set. I don't think Jorge has said what the datatype of the
filter set is, but perhaps it is numeric or alphabetic.

If numeric, it may be possible to replace some of the 40,000 individual
value tests by range tests. Even if that doesn't produce the precise
resultset wanted, it can be supplemented by additional queries to
retrieve more rows or by additional filtering to remove false hits.

Similarly if the data type is alphabetic, it may be possible to combine
multiple filters using by pattern-matching queries.

Those techniques should reduce the length of the query sent to the server.


Of course the original suggestion of IN OR IN OR IN is much simpler to
implement, as is mirroring the source if that can be done without
performance, consistency or terms-of-business problems.

Cheers, Dave

___
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


Re: [Dbix-class] Can't find source in DBIx::Class::Schema::resultset()

2011-10-07 Thread Dave Howorth
Janne Snabb wrote:
 On Fri, 7 Oct 2011, tza...@free.fr wrote:
 
 i'm new using DBIx::Class.
 
 I was also very recently. After figuring it out it is very pleasant
 apart from a couple of oddities.
 
 First question : why my table named regles (with a ending 's')
 gives me a pm file Regle.pm (without ending 's') ?
 
 I got bitten by this also.
 
 It is doing some magic with English language. I got around of this
 simply by sticking with table names which do not end with s. There
 is probably some proper way to tell DBIx::Class that it should NOT
 make an assumption that the table names are in English, but I have
 not found it in documentation yet. Maybe someone else can give further
 details on this?

I believe the POD to read is at
http://search.cpan.org/~rkitover/DBIx-Class-Schema-Loader-0.07010/lib/DBIx/Class/Schema/Loader/Base.pm#naming
I don't know whether that gives you enough flexibility, but it probably
provides a strong enough hint as to which bit of code to comment out if
you want to disable the name mangling entirely.

Cheers, Dave

___
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


Re: [Dbix-class] Can't find source in DBIx::Class::Schema::resultset()

2011-10-07 Thread Dave Howorth
Dave Howorth wrote:
 I believe the POD to read is at
 http://search.cpan.org/~rkitover/DBIx-Class-Schema-Loader-0.07010/lib/DBIx/Class/Schema/Loader/Base.pm#naming
 I don't know whether that gives you enough flexibility, but it probably
 provides a strong enough hint as to which bit of code to comment out if
 you want to disable the name mangling entirely.

Oh and the later sections on moniker_map, col_accessor_map,
inflect_plural, inflect_singular

___
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


Re: [Dbix-class] using as normal perl module

2011-07-29 Thread Dave Howorth
Rajeev Prasad wrote:
 all the examples i see are of using the module in a webapp (built with 
 catalyst). I am only trying to use it in my cgi perl programe, but finding 
 very less documentation. can someone please refer a URL or small script which 
 stores and retrieves data from a table using this module plz.

http://search.cpan.org/~abraxxa/DBIx-Class-0.08195/lib/DBIx/Class/Manual/Example.pod


___
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


Re: [Dbix-class] deleting from a view

2011-07-07 Thread Dave Howorth
Ashley Pond V wrote:
 On Wed, Jul 6, 2011 at 7:01 AM, Dave Howorth dhowo...@mrc-lmb.cam.ac.uk 
 wrote:
 I have a DBIC class made up using a UNION, something like this
 simplified example:

  __PACKAGE__-table('nodes');
  __PACKAGE__-result_source_instance-is_virtual(1);
  __PACKAGE__-result_source_instance-view_definition(
   SELECT
sp_id AS id,
sp_status  COLLATE latin1_general_ci AS status,
FROM sp
UNION
SELECT
pr_id AS id,
pr_status  COLLATE latin1_general_ci AS status,
FROM pr);

 It works fine but I now find I need to delete all records from the
 database where status = 'obsolete'.

 I've discovered that this doesn't work:

  $node_rs-search({status = 'obsolete' })-delete;

 and neither does this:

  my $obs_node_rs = $node_rs-search({status = 'obsolete' });
  while (my $node = $obs_node_rs-next) {
 $node-delete;
  }

 Is there some idiom that does work, or am I going to need to operate on
 the individual tables separately (there are more than two, sadly)?

 
 Untested, stub code, YMMV, might need to handle two real tables/RSes,
 et cetera, but something like this will work if adapted to your code-
 
 my $sp_id_query = $node_rs-search({status = 'obsolete' })
 -get_column(sp_id)
 -as_query;
 
 $sp_rs-search({ id = { IN = $sp_id_query } })
 -delete_all;

I assumed that $sp_rs = $schema-resultset('Sp'). Given that assumption,
it generates code which deletes all the rows in 'sp', as long as at
least one of them has 'obsolete' status. I'm not sure how to modify it
to just delete the obsolete ones.

I modified my code to look like this:

 my $obs_node_rs = $node_rs-search({status = 'obsolete' });
 while (my $node = $obs_node_rs-next) {
 $node-underlying-delete;
 }

where 'underlying' is a new method I wrote that casts a node to a
corresponding object from the underlying table ('sp' or 'pr' etc).
That works but results in a series of SELECT followed by DELETE:

 SELECT me.sp_id, me.sp_status FROM sp me WHERE ( me.sp_id = ? ): '600011'
 DELETE FROM species WHERE ( sp_id = ? ): '600011'

The SELECTs are completely redundant. Is there any way in DBIC to delete
a row from a table given the primary key other than retrieving a full
object to invoke delete on?

Fortunately, there's only a few thousand rows so a better method is now
more a matter of tidiness than necessity.

___
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


Re: [Dbix-class] deleting from a view

2011-07-07 Thread Dave Howorth
I wrote:
 That works but results in a series of SELECT followed by DELETE:
 
  SELECT me.sp_id, me.sp_status FROM sp me WHERE ( me.sp_id = ? ): '600011'
  DELETE FROM species WHERE ( sp_id = ? ): '600011'

Just to be clear. The same pair of queries results from the following code:

 $sp_rs-find($id)-delete;

 The SELECTs are completely redundant. Is there any way in DBIC to delete
 a row from a table given the primary key other than retrieving a full
 object to invoke delete on?


___
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] deleting from a view

2011-07-06 Thread Dave Howorth
I have a DBIC class made up using a UNION, something like this
simplified example:

 __PACKAGE__-table('nodes');
 __PACKAGE__-result_source_instance-is_virtual(1);
 __PACKAGE__-result_source_instance-view_definition(
   SELECT
sp_id AS id,
sp_status  COLLATE latin1_general_ci AS status,
FROM sp
UNION
SELECT
pr_id AS id,
pr_status  COLLATE latin1_general_ci AS status,
FROM pr);

It works fine but I now find I need to delete all records from the
database where status = 'obsolete'.

I've discovered that this doesn't work:

 $node_rs-search({status = 'obsolete' })-delete;

and neither does this:

 my $obs_node_rs = $node_rs-search({status = 'obsolete' });
 while (my $node = $obs_node_rs-next) {
 $node-delete;
 }

Is there some idiom that does work, or am I going to need to operate on
the individual tables separately (there are more than two, sadly)?

Cheers, Dave

___
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


Re: [Dbix-class] enum column values

2011-03-08 Thread Dave Howorth
kevin montuori wrote:
 On the other hand, if you can't tweak your schema, I hope someone has
 a reasonable answer for you, I'm afraid I don't.

Correct; it's not my schema to tweak.

Cheers, Dave

___
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


Re: [Dbix-class] enum column values

2011-03-08 Thread Dave Howorth
Rob Kinyon wrote:
 Have you tried just using the column without declaring the enum
 values? The stuff in column_info isn't really used unless you're
 creating the schema from DBIC. DBIC doesn't actually do any validation
 of enum values (or anything else, for that matter) when you read from
 or write to the database.

I hadn't no; I foolishly assumed that all the data in add_columns was
there for some purpose :)  But you're quite right, there seems to be no
need to jump through the remove_column, add_column hoop.

So I've just created a specific method to read the enum values from the
database. That seems to work.

Thanks, Dave


___
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


Re: [Dbix-class] enum column values

2011-03-08 Thread Dave Howorth
Rob Kinyon wrote:
 Why do you even need to know this list at all? Is this to present a
 list to a user or something?

Exactly so. A browser page.

Cheers, Dave

___
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


Re: [Dbix-class] DBIx::Class::Schema::Loader Can't use string error

2010-11-01 Thread Dave Howorth
Dave Howorth wrote:
 I can also confirm that it really is a problem in
 DBIx::Class::Schema::Loader or one of its dependencies.
[snip]
 Unfortunately, I haven't yet reproduced it with a reasonably small
 schema that makes it clear exactly where the problem is. A minimal
 example doesn't show the problem. It's something to do with mishandling
 of accessor name clashes but I'm not certain about the details yet.

OK, I've now got a failing test case and I understand the cause of the
crash in DBIx::Class::Schema::Loader (DCSL).

The test case is inline below. Note that the order of defining columns
in the database is critical to provoking the bug, which is why my
simplest cases didn't show it.

The data that causes DCSL to crash is a schema that contains a foreign
key  column definition 'belongs_to' (it predates DBIC). The same table
also has another column that is a foreign key. DCSL emits code that
injects a belongs_to relationship called 'belongs_to' into the package
and then tries to execute it as though it were the built-in method of
the same name.

DCSL::Base has a method called _resolve_col_accessor_collisions that
notices naming conflicts. But DCSL::RelBuilder doesn't make use of that
information. A possible fix would be to make it do so or otherwise make
an equivalent check before generating code.

But in my view a better solution would be for DCSL to emit warnings
about name clashes and not generate code at all. Quietly generating code
that isn't going to work even if it doesn't immediately crash, as it
does in most cases at present, is not very helpful to the user.


Another question is how to produce a functioning Result class, once one
is made aware of the need for customisation. I have found
custom_column_info but its POD says Hook for adding *extra* attributes
to the column_info for a column (my emphasis). I have found that I can
use it to change existing attributes, specifically 'accessor', so code
like that below appears to generate usable classes, even though the
replaced accessor name doesn't appear in the generated relationship
definition:

use DBIx::Class::Schema::Loader qw/ make_schema_at /;

sub my_custom_column_info
{
my ($table_name, $column_name, $column_info) = @_;

if ($column_name eq 'belongs_to')
{
return { accessor = 'belong_him' };
}
}


make_schema_at( 'NameClash2::Schema',
{
debug = 1,
dump_directory = '.',
custom_column_info = \my_custom_column_info,
},
[
dbi:SQLite:dbname=$file,
'',
'',
],
);


It's then possible in a script using the generated classes to say
$t2_obj-belong_him and get a T1 object in return.


Is that a good way to change accessor names or is there a better way? I
couldn't find any documentation and am concerned whether it works in all
cases and will keep working in the future?


Cheers, Dave


 name-clash-test.pl =

#!/usr/bin/perl
use strict;
use warnings;

=head1 NAME

name-clash-test.pl - crash DBIx::Class::Schema::Loader when there is a
column name that collides with a built-in method name

2010-10-28

=cut

my $file = 'name-clash-test.dbfile';

my $ddl1 = '
CREATE TABLE t1 (
id INTEGER PRIMARY KEY,
noise  TEXT
);';

my $ddl2 = '
CREATE TABLE t2 (
id INTEGER PRIMARY KEY,
second_foreign_key INTEGER,
belongs_to INTEGER,
FOREIGN KEY (second_foreign_key) REFERENCES t1(id),
FOREIGN KEY (belongs_to) REFERENCES t1(id)
);';

my $sql1 = 'INSERT INTO t1 (noise) VALUES (art of);';
my $sql2 = 'INSERT INTO t2 (belongs_to) VALUES (1);';

unlink $file if -e $file;

use DBI;

# DBI-trace(1);

my $dbh = DBI-connect(dbi:SQLite:dbname=$file, '', '') or die;
$dbh-do($ddl1) or die;
$dbh-do($ddl2) or die;
$dbh-do($sql1) or die;
$dbh-do($sql2) or die;
$dbh-disconnect or die;


use DBIx::Class::Schema::Loader qw/ make_schema_at /;

make_schema_at( 'NameClash::Schema',
{
debug = 1,
dump_directory = '.',
},
[
dbi:SQLite:dbname=$file,
'',
'',
],
);

___
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


Re: [Dbix-class] DBIx::Class::Schema::Loader Can't use string error

2010-10-29 Thread Dave Howorth
Just to confirm that this problem is still present with DBIx::Class
0.08124.

I can also confirm that it really is a problem in
DBIx::Class::Schema::Loader or one of its dependencies. I reproduced it
without any of my code at all:

$ dbicdump 'junk::schema'  'dbi:mysql:host=suse3;database=q_d_1'
Dumping manual schema for junk::schema to directory . ...
Schema dump completed.
Failed to reload class junk::schema::Result::EntryAttribute: Can't use
string (junk::schema::Result::EntryAttri) as a HASH ref while strict
refs in use at /usr/local/share/perl/5.10.1/DBIx/Class/Row.pm line 864.
Compilation failed in require at (eval 673) line 3.


But that still uses my fairly large schema :(

Unfortunately, I haven't yet reproduced it with a reasonably small
schema that makes it clear exactly where the problem is. A minimal
example doesn't show the problem. It's something to do with mishandling
of accessor name clashes but I'm not certain about the details yet.

Cheers, Dave

___
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


Re: [Dbix-class] DBIx::Class::Schema::Loader Can't use string error

2010-10-28 Thread Dave Howorth
Oleg Kostyuk wrote:
 Typo in your schema definition?

 I think, you wrote somewhere QD1x::Schema::Result::EntryAttri
 instead of QD1x::Schema::Result::EntryAttribute
 Try:
   grep -r QD1x::Schema::Result::EntryAttri\\ .

Err, no. I haven't written any schema definition (in the DBIx::Class
sense). The whole point of the code I'm running is to have
Schema::Loader produce such a schema from the existing database.

The mispelled name had me worried too but it appears from single
stepping to be some oddity of the crash reporting process rather than
the cause of the crash.

The immediate cause of the error is exactly as it reports.
DBIx::Class::Row is trying to dereference the string
QD1x::Schema::Result::EntryAttribute as though it were a hash
reference. I'm currently trying to find out why it's doing that.

So nobody's seen this before then?

Cheers, Dave

___
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] DBIx::Class::Schema::Loader Can't use string error

2010-10-27 Thread Dave Howorth
I just installed DBIx::Class::Schema::Loader on a new machine (what a
lot of dependencies!) and tried to run this code:

#!/usr/bin/perl
use strict;
use warnings;

use DBIx::Class::Schema::Loader qw/ make_schema_at /;

make_schema_at( 'QD1x::Schema',
{
   dump_directory = '.',
},
[
   'dbi:mysql:host=suse3;database=q_d_1',
   'dhoworth',
   '',
],
);


It seems to have produced reasonable looking schema files but it also
produced an error when it ran:

$ ./create-schema.pl
Dumping manual schema for QD1x::Schema to directory . ...
Schema dump completed.
Failed to reload class QD1x::Schema::Result::EntryAttribute: Can't use
string (QD1x::Schema::Result::EntryAttri) as a HASH ref while strict
refs in use at /usr/local/share/perl/5.10.1/DBIx/Class/Row.pm line 864.
Compilation failed in require at (eval 650) line 3.

I checked and DBIx::Class is up to date (0.08123).

Does anybody have any idea what the error means?

Thanks, Dave

___
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


Re: [Dbix-class] Read only resultsets

2010-08-12 Thread Dave Howorth
Dan Horne wrote:
 The recent discussion on read only objects has got me wondering. Say one
 has an app which basically sends result sets to TT templates. What stops
 a malicious designer from doing DB updates in the templates since they
 have the RS objects?

Make sure that the DBI connection that the templates use is of a db-user
that only has SELECT privileges?

Cheers, Dave

___
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


Re: [Dbix-class] combining tables

2010-06-18 Thread Dave Howorth
Rob Kinyon wrote:
 DBIx::Class views are the way to go. Look in the ResultSource documentation.

Thanks for the confirmation. It turns out what I didn't realize was how
to apply a SQL UNION in that context. So it's working now.

Thanks, Dave

___
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] combining tables

2010-06-17 Thread Dave Howorth
Is there way to present a merged view of some tables using DBIx::Class?

Imagine I have three tables:

pig (
pig_idINT,
pig_name  TEXT,
colourENUM ('brown', 'black', 'white),
);

cow (
cow_idINT,
cow_name  TEXT,
colourENUM ('brown', 'black', 'white),
);

sheep (
sheep_idINT,
sheep_name  TEXT,
colour  ENUM ('brown', 'black', 'white),
);

What's more, the values of pig_id, cow_id and sheep_id are disjoint.

I'd like DBIC to present them as though they were a single table

animal (
id  INT,
nameTEXT,
colour  ENUM ('brown', 'black', 'white),
);

Is there some way to do that?

Thanks, Dave

___
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] add_unique_constraint syntax generated by DBIx::Class::Schema::Loader

2010-05-18 Thread Dave Howorth
I'm trying to understand the files generated by Loader, which I've
generated from an existing database. In many cases, the syntax generated
for calls to add_unique_constraint() don't match that in any
documentation I've found and I don't understand it when reading the
implementation of add_unique_constraint either. Here's an example file:

package TDB::Schema::Functions;

# Created by DBIx::Class::Schema::Loader v0.03000 @ 2010-05-18 14:52:15

use strict;
use warnings;

use base 'DBIx::Class';

__PACKAGE__-load_components(PK::Auto, Core);
__PACKAGE__-table(functions);
__PACKAGE__-add_columns(func, description);
__PACKAGE__-set_primary_key(func);
__PACKAGE__-add_unique_constraint([func], undef);

1;

I don't understand that trailing undef. All the docs I've seen have the
list of columns as the last argument.

Cheers, Dave

___
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


Re: [Dbix-class] Re: add_unique_constraint syntax generated by DBIx::Class::Schema::Loader

2010-05-18 Thread Dave Howorth
Dagfinn Ilmari Mannsåker wrote:
 Dave Howorth dhowo...@mrc-lmb.cam.ac.uk writes:
 
 # Created by DBIx::Class::Schema::Loader v0.03000 @ 2010-05-18 14:52:15
 
 This is a _very_ old version of Schema::Loader (almost four years!),
 please upgrade to the latest version.

Thanks. Yes, I'd just discovered that. I thought I'd upgraded everything
but somehow that got missed.

Sorry for the noise,
Dave



___
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


Re: [Dbix-class] [Script] dbic_ddl_admin.pl a script for creating sql diffs, deploying schemas and upgrading them

2009-11-26 Thread Dave Howorth
Alexander Hartmaier wrote:
 Can you make it available as download please?

Can you just download it from the archive?

http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20091125/d5e4bdf2/dbic_ddl_admin.pl

Cheers, Dave

___
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


Re: [Dbix-class] CDBICompat NumExplodingSheep

2008-11-19 Thread Dave Howorth
I wrote:
 I think there are some problems in test t/cdbi-t/15-accessor-new.t
...
 I also think there's a problem with find_or_create() and accessor_for().
 For starters there're no tests! But I haven't yet got a set of tests for
 which I understand the results and which agree with the failure I'm
 seeing in my application. They're similar to the one for search()  I'll
 post some tests when I have them.

OK. I've attached a patch to t/cdbi-t/15-accessor.t that does several
things:

(1) Fixes the way the arguments are built so the sheep argument is
correct in the tests.

(2) Adds explicit tests for the number of sheep so we can be sure which
database record is actually returned.

(3) Adds tests for find_or_create() with modified accessor names.

(4) Fixes the test for search() to report all errors

I still don't fully understand what's going on in the output below but I
think they are genuine test failures. I'd appreciate it if somebody else
could run the tests to make sure the results are not some artefact of my
test environment. I also attached a copy of the modified test script so
you don't even have to apply the patch first :)

I don't know what the DestroyWarning at the end is all about.

Thanks, Dave

1..75
ok 1 - Modified accessor - with column name
ok 2 - The object isa Film
ok 3 - sheep bursting violently
ok 4 - No errors
ok 5 - Modified accessor - with accessor
ok 6 - The object isa Film
ok 7 - sheep bursting violently
ok 8 - No errors
DBIx::Class::CDBICompat::Retrieve::find_or_create(): Query returned more
than one row.  SQL that returns multiple rows is DEPRECATED for -find
and -single at ../15-accessor-new.t line 80
ok 9 - find_or_create Modified accessor - find with column name
ok 10 - The object isa Film
ok 11 - sheep bursting violently
ok 12 - No errors
DBIx::Class::CDBICompat::Retrieve::find_or_create(): Query returned more
than one row.  SQL that returns multiple rows is DEPRECATED for -find
and -single at ../15-accessor-new.t line 90
ok 13 - find_or_create Modified accessor - find with accessor
ok 14 - The object isa Film
ok 15 - sheep bursting violently
ok 16 - No errors
DBIx::Class::CDBICompat::Retrieve::find_or_create(): Query returned more
than one row.  SQL that returns multiple rows is DEPRECATED for -find
and -single at ../15-accessor-new.t line 100
ok 17 - find_or_create Modified accessor - create with column name
ok 18 - The object isa Film
not ok 19 - sheep bursting violently
#   Failed test 'sheep bursting violently'
#   at ../15-accessor-new.t line 103.
#  got: '1'
# expected: '3'
ok 20 - No errors
DBIx::Class::CDBICompat::Retrieve::find_or_create(): Query returned more
than one row.  SQL that returns multiple rows is DEPRECATED for -find
and -single at ../15-accessor-new.t line 110
ok 21 - find_or_create Modified accessor - create with accessor
ok 22 - The object isa Film
not ok 23 - sheep bursting violently
#   Failed test 'sheep bursting violently'
#   at ../15-accessor-new.t line 113.
#  got: '1'
# expected: '4'
ok 24 - No errors
not ok 25 - No errors
#   Failed test 'No errors'
#   at ../15-accessor-new.t line 121.
#  got: 'DBIx::Class::CDBICompat::Relationships::search(): DBI
Exception: DBD::SQLite::db prepare_cached failed: no such column:
sheep(1) at dbdimp.c line 271 [for Statement SELECT me.title FROM
Movies me WHERE ( sheep = ? )] at ../15-accessor-new.t line 118
# '
# expected: ''
ok 26 - Modified mutator - with mutator
ok 27 - The object isa Film
ok 28 - No errors
ok 29 - Modified mutator - with column name
ok 30 - The object isa Film
ok 31 - No errors
ok 32 - Modified mutator - with accessor
ok 33 - The object isa Film
ok 34 - No errors
ok 35
ok 36 - no hasa film
ok 37 - hasa movie
ok 38 - The object isa Film
ok 39 -  - Bad Taste
ok 40 - No errors
ok 41 - Can't locate object method film via package Actor at
../15-accessor-new.t line 173.
#
ok 42 - 'main' cannot alter the value of 'film' on objects of class
'Actor' at ../15-accessor-new.t line 176
#
ok 43 - Set movie through hasa
ok 44 - hasa movie
ok 45 - The object isa Film
ok 46 -  - Another Film
ok 47 - No problem
ok 48 - a custom accessor without a custom mutator is setable
ok 49 - nonpersistent is a column
ok 50 -  - but it's not real
ok 51 - Title set OK
ok 52 - As is non persistent value
ok 53 - Re-retrieve film
ok 54 - Title still OK
ok 55 - Non persistent value gone
ok 56 - Can set it
ok 57 - And it's there again
ok 58 - Commit the film
ok 59 - And it's still there
ok 60 - Actor has no specific essential columns
ok 61 - nonpersistent is a column
ok 62 -  - but it's not real
ok 63 - no problems retrieving actors
ok 64 - The object isa Actor
ok 65 - Can update Naked
ok 66 - Make Naked read only
ok 67 - Can't update Naked any more
ok 68 - But can still update Secrets and Lies
ok 69 - And can still create new films isa Film
ok 70 - Make all Films read only
ok 71 - Still can't update Naked
ok 72 - And can't update SL any more
ok 73 - And can't delete 4 Days in July
ok 74 - 

[Dbix-class] CDBICompat NumExplodingSheep

2008-11-18 Thread Dave Howorth
I think there are some problems in test t/cdbi-t/15-accessor-new.t

=

I think there's a latent bug after line 53:

my $data = {
Title= 'Bad Taste',
Director = 'Peter Jackson',
Rating   = 'R',
};

eval {
my $data = $data;
$data-{NumExplodingSheep} = 1;
ok my $bt = Film-create($data), Modified accessor - with column name;
isa_ok $bt, Film;
};
is $@, '', No errors;

eval {
my $data = $data;
$data-{sheep} = 1;
ok my $bt = Film-create($data), Modified accessor - with accessor;
isa_ok $bt, Film;
};
is $@, '', No errors;

The problem is that in the second eval $data-{NumExplodingSheep} still
has the value 1 [the lovely tricky assignment is only doing a top-level
copy, so the value from the first eval was copied into the top-level
lexical and made available in the second eval]. So that test isn't
really a fair test of what it claims to be testing.

Luckily, the test still passes after hacking in a:
  delete $data-{NumExplodingSheep};
which is good news. I expect something like my $data = { %$data }; might
be better, or even using different variable names.

=

I think there's an actual problem with Can search with modified
accessor. Namely, there is no
  is $@, '', No errors;
after the eval. After adding one, I see this output:


not ok 17 - No errors
#   Failed test 'No errors'
#   at ../15-accessor-new.t line 108.
#  got: 'DBIx::Class::CDBICompat::HasA::search(): DBI Exception:
DBD::SQLite::db prepare_cached failed: no such column: sheep(1) at
dbdimp.c line 271 [for Statement SELECT me.title FROM Movies me WHERE (
sheep = ? )] at ../15-accessor-new.t line 104
# '
# expected: ''

(line and test numbers are not quite right because of other things I
changed above)

So AFAICT, search() does NOT work.

=

I also think there's a problem with find_or_create() and accessor_for().
For starters there're no tests! But I haven't yet got a set of tests for
which I understand the results and which agree with the failure I'm
seeing in my application. They're similar to the one for search()  I'll
post some tests when I have them.

=

More generally, the description of DBIx::Class::CDBICompat says
DBIx::Class features a fully featured compatibility layer with
Class::DBI and there's an impressively short list of limitations. I'm
beginning to have doubts about that description - has anybody used this
stuff?

Cheers, Dave

___
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


Re: [Dbix-class] CDBICompat

2008-11-17 Thread Dave Howorth
Matt S Trout wrote:
 On Tue, Nov 11, 2008 at 12:10:03PM +, Dave Howorth wrote:
 Dave Howorth wrote:
 I've poked around some more and think I've found the source of the
 problem. I went back to a small example that worked and then
 experimented until it broke.
 I looked at the cdbi-t tests to see how connection() is tested. AFAICT,
 it isn't! So here are two tests for connection. The first one passes for
 me and the second one fails.
 
 Are you testing against CPAN or dev release? The latter has many many
 fixes by schwern integrated. If you can produce a test against current
 trunk that still fails, we can see about digging around and fixing it.

I'm running against a dev release. I just updated to rev 5158 and ran
the tests again with the same results - #1 works, #2 fails.

In poking around to get my code working I found that a lot of POD in
DBIx::Class::DB has been concealed because the class is deprecated
except for CDBICompat. Once I discovered it, that POD gave me a hint and
I've found that adding the line:

  __PACKAGE__-setup_schema_instance;

immediately after

  use base 'DBIx::Class::CDBICompat';

appears to make my code work.

So I'd suggest that at a minimum the description of that method ought to
be copied into the LIMITATIONS section of the DBIx::Class::CDBICompat
POD. I don't know if any more of that POD is also still relevant.

Nicer would be something that called the method automatically, of course
:) But I haven't figured that out.

Cheers, Dave

___
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] CDBICompat sth_to_objects

2008-11-17 Thread Dave Howorth
The implementation of sth_to_objects in DBIx/Class/CDBICompat/ImaDBI.pm
doesn't seem to be fully compatible with that in Class/DBI.pm

Specifically, the method in Class::DBI is context aware and returns an
iterator in scalar context. The CDBICompat version isn't context aware
and so returns a row count!

I see there is DBIx::Class::CDBICompat::Iterator which says See
DBIx::Class::CDBICompat for directions for use but I can see no mention
 of the word iterator in the DBIx::Class::CDBICompat POD. So I don't
know whether CLass::DBI's array vs iterator feature is supposed to work
in CDBICompat or not. If it isn't, it should die rather than return
faulty data, IMHO.


Cheers, Dave


PS OT but I'm also confused by this code in Class::DBI

  sub _ids_to_objects {
my ($class, $data) = @_;
return $#$data + 1 unless defined wantarray;
return map $class-construct($_), @$data if wantarray;
return $class-_my_iterator-new($class = $data);
  }

I think 'defined wantarray' only returns undefined in void context, so I
don't understand why it's returning the record count?

___
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


[Fwd: Abwesenheitsnotiz: [Dbix-class] CDBICompat sth_to_objects]

2008-11-17 Thread Dave Howorth
I just got the following in response to my posting.

Perhaps this spammer could have his subscription terminated.

 Original Message 
Subject:Abwesenheitsnotiz: [Dbix-class] CDBICompat sth_to_objects
Date:   Mon, 17 Nov 2008 16:45:50 +0100
From:   Holger Göbber [EMAIL PROTECTED]
To: Dave Howorth (via Nabble) [EMAIL PROTECTED]

Sehr geehrte Kunden. Ich bin vom 17.11 bis 21.11.2008 nicht im Haus. Bei
Fragen wenden Sie sich bitte an meinen Kollegen Jakob Reiter unter:
[EMAIL PROTECTED]

Mit freundlichen Grüßen,
Holger Göbber

Exelution GmbH


___
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


Re: [Dbix-class] CDBICompat

2008-11-11 Thread Dave Howorth
Dave Howorth wrote:
 I've poked around some more and think I've found the source of the
 problem. I went back to a small example that worked and then
 experimented until it broke.

I looked at the cdbi-t tests to see how connection() is tested. AFAICT,
it isn't! So here are two tests for connection. The first one passes for
me and the second one fails.

Both pass if I replace

  use base 'DBIx::Class::CDBICompat';
with
  use base 'Class::DBI';

So can I ask that the tests be added to the test suite. I'm afraid I
don't know enough about DBIC internals to offer a patch so the test passes.

Thanks and regards,
Dave Howorth


cdbicompat-connection-test-1.t
Description: Troff document


cdbicompat-connection-test-2.t
Description: Troff document
___
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

Re: [Dbix-class] t/92storage_on_connect_do.t

2008-10-10 Thread Dave Howorth
Dave Howorth wrote:
 And that brings us to the last oddity, which appears to be the cause of
 my problem, but again my brain is struggling with why the test doesn't
 fail for everybody?
 ...
 So is the test wrong, or the module, or is my brain fried?
 
 Can anybody please confirm whether they see this failure or not?

warnocked again, I see.

I've done some more poking and now understand why the test doesn't fail
for everybody. The failing code path is only executed if $self-debug. I
had DBIC_TRACE set because of my previous problems. If I unset it, the
test passes.

So that seems to answer my next question. My brain's not fried; the
module is broken. To duplicate the problem:

  DBIC_TRACE=1 make test

Cheers, Dave

___
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


Re: [Dbix-class] t/92storage_on_connect_do.t

2008-10-10 Thread Dave Howorth
Peter Rabbitson wrote:
 Well this would explain the long traces for one.

Good point - well spotted.

 So the right way to fix the warning tests is to determine if we are
 in debug mode and match accordingly. I don't think it is wise to just
 expand the regexes, since seeing full traces when they are not
 requested IS a bug. I can take a stab at this early next week if no
 one else fixes it before that.

There's another possible strategy, which is to control debug mode in the
tests. Basically, run the tests twice. That seems necessary to expose
broken code paths like the one in DBIx::Class::Storage::DBI I appear to
have just found. But I guess it all depends how comprehensive the tests
are supposed to be.

 Out of curiosity - why are you running the test in debug mode?

I set it when I was trying to find out why t/61findnot.t was failing.

Cheers, Dave

___
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


Re: [Dbix-class] install test failures

2008-10-07 Thread Dave Howorth
Peter Rabbitson wrote:
 Dave Howorth wrote:
 Peter Rabbitson wrote:
 Dave Howorth wrote:
 This doesn't solve my issue with t/81transactions.t. I'll look at that now.
 About t/81transactions - does this happen on trunk with no
 midifications? What is your `env | grep DBICTEST` if any?
 Yes, it happens on trunk with no modifications. No output for DBICTEST.

 Updating Test::Exception hasn't fixed it either. Still looking ...

 
 How about Scope::Guard ?

I already have the latest version of that.

The error I'm seeing is:

not ok 56 - Error propogated okay
#   Failed test 'Error propogated okay'
#   at t/81transactions.t line 259.
# expecting: Regexp ((?-xism:No such column made_up_column .*? at
.*?81transactions.t line \d+))
# found: DBIx::Class::Exception (No such column made_up_column on
DBICTest::Artist at blib/lib/DBIx/Class/Schema.pm line 1080
#
DBIx::Class::Schema::throw_exception('DBICTest::Schema=HASH(0x88c8160)',
'undef', 'DBICTest::Schema=HASH(0x88c8160)', 'undef', 'CODE(0x8295864)',
'CODE(0x88ca198)') called at blib/lib/DBIx/Class/Row.pm line 856
#
DBIx::Class::Row::throw_exception('DBICTest::Schema=HASH(0x88c8160)',
'undef', 'DBICTest::Schema=HASH(0x88c8160)', 'undef', 'CODE(0x8295864)',
'CODE(0x88ca198)') called at blib/lib/DBIx/Class/Row.pm line 155
#   DBIx::Class::Row::new('DBICTest::Schema=HASH(0x88c8160)',
'undef', 'DBICTest::Schema=HASH(0x88c8160)', 'undef', 'CODE(0x8295864)',
'CODE(0x88ca198)') called at blib/lib/DBIx/Class/ResultSet.pm line 1571
#
DBIx::Class::ResultSet::new_result('DBICTest::Schema=HASH(0x88c8160)',
'undef', 'DBICTest::Schema=HASH(0x88c8160)', 'undef', 'CODE(0x8295864)',
'CODE(0x88ca198)') called at blib/lib/DBIx/Class/ResultSet.pm line 1741
#
DBIx::Class::ResultSet::create('DBICTest::Schema=HASH(0x88c8160)',
'undef', 'DBICTest::Schema=HASH(0x88c8160)', 'undef', 'CODE(0x8295864)',
'CODE(0x88ca198)') called at t/81transactions.t line 253
#   Test::Exception::throws_ok('DBICTest::Schema=HASH(0x88c8160)',
'undef', 'DBICTest::Schema=HASH(0x88c8160)', 'undef', 'CODE(0x8295864)',
'CODE(0x88ca198)') called at t/81transactions.t line 259
# )



The test uses this regex: qr/No such column made_up_column .*? at
.*?81transactions.t line \d+/,

I'm not clear why it needs to use such a complicated regex instead of
just qr/No such column made_up_column/ ?

I also don't understand why it doesn't need a /s modifier but I tried
adding one and it didn't fix it so clearly I'm not thinking straight!

Cheers, Dave

___
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


Re: [Dbix-class] install test failures

2008-10-07 Thread Dave Howorth
Dave Howorth wrote:
 The test uses this regex: qr/No such column made_up_column .*? at
 .*?81transactions.t line \d+/,
 
 I'm not clear why it needs to use such a complicated regex instead of
 just qr/No such column made_up_column/ ?
 
 I also don't understand why it doesn't need a /s modifier but I tried
 adding one and it didn't fix it so clearly I'm not thinking straight!

OK. Adding a /s modifier does fix the problem. My earlier failure was
finger trouble.

So I now believe I know why the test fails. And I can suggest the two
possible solutions above BUT:

(1) I don't know how the test passes for anybody!? and
(2) I don't know why the test is written as it is so I'm reluctant to
propose a change.

Thoughts?

Cheers, Dave

___
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


Re: [Dbix-class] install test failures

2008-10-07 Thread Dave Howorth
Peter Rabbitson wrote:
 Dave Howorth wrote:
 This doesn't solve my issue with t/81transactions.t. I'll look at that now.
 
 About t/81transactions - does this happen on trunk with no
 midifications? What is your `env | grep DBICTEST` if any?

Yes, it happens on trunk with no modifications. No output for DBICTEST.

Updating Test::Exception hasn't fixed it either. Still looking ...

Cheers, Dave

___
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


Re: [Dbix-class] install test failures

2008-10-03 Thread Dave Howorth
Ash Berlin wrote:
 On 2 Oct 2008, at 11:37, Dave Howorth wrote:
 Zbigniew Lukasiak wrote:
 better load the latest svn version from:
 http://dev.catalyst.perl.org/repos/bast/DBIx-Class/0.08/trunk

 I tried that but am seeing a problem - I'm not very familiar with
 building Perl distributions except from CPAN. It seems to have
 downloaded correctly but when I try to build it I see this:

 .../trunk$ perl Makefile.PL
 Can't locate inc/Module/Install.pm in @INC (@INC contains:
...
 When you are installing/building the SVN version, it wont have
 Module::Install embedded into it yet, so you need to install
 Module::Install from CPAN first:
...
 Then try running the Makefile.PL from trunk again.

OK, I finally appear to have Module::Install mostly running. I still see
the same test failures though:

t/61findnotok 1/20
#   Failed test 'Non-unique find generated a cursor inexhaustion warning'
#   at t/61findnot.t line 57.
# found warning: Test::Warn::warnings_are(): Query returned more than
one row. SQL that returns multiple rows is DEPRECATED for -find and
-single at t/61findnot.t line 57
t/61findnotNOK 19/20# expected
to find warning: DBIx::Class::ResultSet::find(): Query returned more
than one row.  SQL that returns multiple rows is DEPRECATED for -find
and -single

#   Failed test 'Non-unique find generated a cursor inexhaustion warning'
#   at t/61findnot.t line 63.
# found warning: Test::Warn::warnings_are(): Query returned more than
one row at t/61findnot.t line 63
# expected to find warning: DBIx::Class::ResultSet::find(): Query
returned more than one row
t/61findnotNOK 20/20# Looks like
you failed 2 tests of 20.
t/61findnotdubious
Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 19-20
Failed 2/20 tests, 90.00% okay


t/81transactions...ok 1/63
#   Failed test 'Error propogated okay'
#   at t/81transactions.t line 259.
# expecting: Regexp ((?-xism:No such column made_up_column .*? at
.*?81transactions.t line \d+))
t/81transactions...NOK 56/63# found:
DBIx::Class::Exception (Test::Exception::_try_as_caller(): No such
column made_up_column on DBICTest::Artist at
/usr/lib/perl5/site_perl/5.8.6/Test/Exception.pm line 226
# )
A DBIx::Class::Storage::TxnScopeGuard went out of scope without explicit
commit or an error - bad at
~burble~/trunk/blib/lib/DBIx/Class/Storage/TxnScopeGuard.pm line 27
DBIx::Class::Storage::TxnScopeGuard::DESTROY() called at
t/81transactions.t line 289
eval {...} called at t/81transactions.t line 289
main::inner() called at t/81transactions.t line 289
main::outer() called at t/81transactions.t line 275
eval {...} called at t/81transactions.t line 272
# Looks like you failed 1 test of 63.
t/81transactions...dubious
Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 56
Failed 1/63 tests, 98.41% okay

Cheers, Dave

___
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/[EMAIL PROTECTED]


Re: [Dbix-class] install test failures

2008-10-02 Thread Dave Howorth
Zbigniew Lukasiak wrote:
 better load the latest svn version from:
 http://dev.catalyst.perl.org/repos/bast/DBIx-Class/0.08/trunk

I tried that but am seeing a problem - I'm not very familiar with
building Perl distributions except from CPAN. It seems to have
downloaded correctly but when I try to build it I see this:

.../trunk$ perl Makefile.PL
Can't locate inc/Module/Install.pm in @INC (@INC contains:
/home/dhoworth/progs/modules
/usr/lib/perl5/5.8.6/i586-linux-thread-multi /usr/lib/perl5/5.8.6
/usr/lib/perl5/site_perl/5.8.6/i586-linux-thread-multi
/usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl
/usr/lib/perl5/vendor_perl/5.8.6/i586-linux-thread-multi
/usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl .) at
Makefile.PL line 1.
BEGIN failed--compilation aborted at Makefile.PL line 1.

And I'm not sure what I should do.

Thanks, Dave

___
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/[EMAIL PROTECTED]


[Dbix-class] install test failures

2008-10-01 Thread Dave Howorth
I just tried to install DBIx-Class-0.08099_04 and have three failing
tests, listed below. I'll poke about to see if I can find out more but
thought I'd post them straight away in case anybody recognizes them. I
didn't find anything in the mail archives and the RT bug for t/33 seems
different.

Thanks, Dave


t/61findnotok 1/20
#   Failed test 'Non-unique find generated a cursor inexhaustion warning'
t/61findnotNOK 19/20#   at
t/61findnot.t line 57.
# found warning: Test::Warn::warnings_are(): Query returned more than
one row. SQL that returns multiple rows is DEPRECATED for -find and
-single at t/61findnot.t line 57
# expected to find warning: DBIx::Class::ResultSet::find(): Query
returned more than one row.  SQL that returns multiple rows is
DEPRECATED for -find and -single

#   Failed test 'Non-unique find generated a cursor inexhaustion warning'
#   at t/61findnot.t line 63.
# found warning: Test::Warn::warnings_are(): Query returned more than
one row at t/61findnot.t line 63
# expected to find warning: DBIx::Class::ResultSet::find(): Query
returned more than one row
t/61findnotNOK 20/20# Looks like
you failed 2 tests of 20.
t/61findnotdubious
Test returned status 2 (wstat 512, 0x200)
DIED. FAILED tests 19-20
Failed 2/20 tests, 90.00% okay



t/81transactions...ok 55/63
#   Failed test 'Error propogated okay'
#   at t/81transactions.t line 259.
# expecting: Regexp ((?-xism:No such column made_up_column .*? at
.*?81transactions.t line \d+))
t/81transactions...NOK 56/63# found:
DBIx::Class::Exception (Test::Exception::_try_as_caller(): No such
column made_up_column on DBICTest::Artist at
/usr/lib/perl5/site_perl/5.8.6/Test/Exception.pm line 226
# )
A DBIx::Class::Storage::TxnScopeGuard went out of scope without explicit
commit or an error - bad at
~burble~/DBIx-Class-0.08099_04/blib/lib/DBIx/Class/Storage/TxnScopeGuard.pm
line 27
DBIx::Class::Storage::TxnScopeGuard::DESTROY() called at
t/81transactions.t line 289
eval {...} called at t/81transactions.t line 289
main::inner() called at t/81transactions.t line 289
main::outer() called at t/81transactions.t line 275
eval {...} called at t/81transactions.t line 272
# Looks like you failed 1 test of 63.
t/81transactions...dubious
Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 56
Failed 1/63 tests, 98.41% okay



DBD::SQLite 1.14 / SQLite 3.4.2


$ perl -V
Summary of my perl5 (revision 5 version 8 subversion 6) configuration:
  Platform:
osname=linux, osvers=2.6.9, archname=i586-linux-thread-multi
uname='linux g226 2.6.9 #1 smp tue jun 28 14:58:56 utc 2005 i686
i686 i386 gnulinux '
config_args='-ds -e -Dprefix=/usr -Dvendorprefix=/usr
-Dinstallusrbinperl -Dusethreads -Di_db -Di_dbm -Di_ndbm -Di_gdbm
-Duseshrplib=true -Doptimize=-O2 -march=i586 -mcpu=i686
-fmessage-length=0 -Wall -g -Wall -pipe'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
  Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-DDEBUGGING -fno-strict-aliasing -pipe -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64',
optimize='-O2 -march=i586 -mcpu=i686 -fmessage-length=0 -Wall -g
-Wall -pipe',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBUGGING
-fno-strict-aliasing -pipe'
ccversion='', gccversion='3.3.5 20050117 (prerelease) (SUSE Linux)',
gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=4, prototype=define
  Linker and Libraries:
ld='cc', ldflags =''
libpth=/lib /usr/lib /usr/local/lib
libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc
libc=, so=so, useshrplib=true, libperl=libperl.so
gnulibc_version='2.3.4'
  Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E
-Wl,-rpath,/usr/lib/perl5/5.8.6/i586-linux-thread-multi/CORE'
cccdlflags='-fPIC', lddlflags='-shared'


Characteristics of this binary (from libperl):
  Compile-time options: DEBUGGING MULTIPLICITY USE_ITHREADS
USE_LARGE_FILES PERL_IMPLICIT_CONTEXT
  Locally applied patches:
SPRINTF0 - fixes for sprintf formatting issues - CVE-2005-3962
  Built under linux
  Compiled at Dec 17 2005 03:23:29
  %ENV:
PERL5LIB=/home/dhoworth/progs/modules
PERLDOC_PAGER=vi
  

Re: [Dbix-class] install test failures

2008-10-01 Thread Dave Howorth
Dave Howorth wrote:
 the RT bug for t/33 seems different.

Oops, brain fart. I see some warnings for t33 but not the reported bug.
Irrelevant to my question.

Cheers, Dave


___
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/[EMAIL PROTECTED]