[Dbix-class] DBIx::Class::ResultSet / resolve_prefetch() / Use
of uninitialized value in pattern match
Chisel Wright
chisel at herlpacker.co.uk
Tue Jul 29 11:05:59 BST 2008
On Tue, Jul 29, 2008 at 10:41:31AM +0100, Matt S Trout wrote:
> On Mon, Jun 30, 2008 at 11:49:58PM +0100, Chisel Wright wrote:
> > Hi all,
> >
> > I noticed a problem with DBIx::Class::ResultSource::resolve_prefetch() a
> > while back, thought I was doing something daft, hacked round it locally
> > and forgot all about it - until today.
> >
> > A co-worker was trying to clean up our apache error logs. During the
> > process he mentioned the issue I'd forgotten about.
> >
> > In a nutshell, when calling ->prefetch_columns(..) the call spews out
> > "Use of uninitialized value in pattern match (m//)" warnings.
>
> I don't see a prefetch_columns method anywhere in the main DBIC dist.
>
> Did you get the wrong method name or is it something external?
I'm not sure where I got prefetch_columns() from, whatever I was
smoking, I hope it was good.
But hopefully the test script I attached previously speaks for itself:
---- cut here ----
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use Test::NoWarnings;
unshift(@INC, './t/lib');
use lib 't/lib';
plan tests => 3;
use DBICTest;
is(
DBICTest::Schema->source('Track')->resultset_class,
'DBIx::Class::ResultSet',
'track resultset class'
);
# initialise our schema
my $schema = DBICTest->init_schema;
# make sure we can call the "cd" relationship
can_ok('DBICTest::Schema::Track', 'cd');
# trigger the warning
my $source = $schema->resultset('Track')->result_source;
my @columns = $source->resolve_prefetch( { cd => 'artist' } );
---- cut here ----
Chisel
--
Chisel Wright
e: chisel at herlpacker.co.uk
w: http://www.herlpacker.co.uk/
AFK, tornado...
More information about the DBIx-Class
mailing list