Skip Menu |

This queue is for tickets about the Catalyst-Model-Adaptor CPAN distribution.

Report information
The Basics
Id: 67078
Status: open
Priority: 0/
Queue: Catalyst-Model-Adaptor

People
Owner: bobtfish [...] bobtfish.net
Requestors: KEEDI [...] cpan.org
Cc:
AdminCc:

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



Catalyst::Model::Adaptor 0.10 could not parse config file correctly. Before 0.10(0.09), attached config file was parsed well. So I am using follow patch to workaround this problem. This is just a quick and dirty approach and I don't know this is a right way to fix this bug. Thanks. diff -urN a/Catalyst/Model/Adaptor/Base.pm b/Catalyst/Model/Adaptor/Base.pm --- a/Catalyst/Model/Adaptor/Base.pm 2011-03-30 14:49:20.038564000 +0900 +++ b/Catalyst/Model/Adaptor/Base.pm 2011-03-30 14:48:46.094564001 +0900 @@ -31,8 +31,8 @@ my ($self, $app, $arg) = @_; return exists $self->{args} ? { %{$self->{args}}, - %$arg, - } : $arg; + %{$arg->{args}}, + } : $arg->{args}; } system: Show quoted text
> $ uname -a > Linux keedi-1810tz 2.6.35-28-generic #49-Ubuntu SMP Tue Mar 1 14:40:58
UTC 2011 i686 GNU/Linux perl: Show quoted text
> $ perl -V > Summary of my perl5 (revision 5 version 12 subversion 1) configuration: > > Platform: > osname=linux, osvers=2.6.35-22-generic,
archname=i686-linux-thread-multi Show quoted text
> uname='linux keedi-1810tz 2.6.35-22-generic #35-ubuntu smp sat oct
16 20:36:48 utc 2010 i686 gnulinux ' Show quoted text
> config_args='-de
-Dprefix=/home/askdna/perl5/perlbrew/perls/perl-5.12.1 -Dusethreads' Show quoted text
> hint=recommended, useposix=true, d_sigaction=define > 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 -fno-strict-aliasing
-pipe -fstack-protector -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64', Show quoted text
> optimize='-O2', > cppflags='-D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -pipe
-fstack-protector -I/usr/local/include' Show quoted text
> ccversion='', gccversion='4.4.5', 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 Show quoted text
> alignbytes=4, prototype=define > Linker and Libraries: > ld='cc', ldflags =' -fstack-protector -L/usr/local/lib' > libpth=/usr/local/lib /lib /usr/lib /usr/lib64 > libs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc > perllibs=-lnsl -ldl -lm -lcrypt -lutil -lpthread -lc > libc=/lib/libc-2.12.1.so, so=so, useshrplib=false, libperl=libperl.a > gnulibc_version='2.12.1' > 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' Show quoted text
> > > Characteristics of this binary (from libperl): > Compile-time options: MULTIPLICITY PERL_DONT_CREATE_GVSV > PERL_IMPLICIT_CONTEXT PERL_MALLOC_WRAP
USE_ITHREADS Show quoted text
> USE_LARGE_FILES USE_PERLIO USE_PERL_ATOF > USE_REENTRANT_API > Built under linux > Compiled at Nov 6 2010 20:48:02 > %ENV: > PERL_MM_USE_DEFAULT="1" > @INC: >
/home/askdna/perl5/perlbrew/perls/perl-5.12.1/lib/site_perl/5.12.1/i686-linux-thread-multi Show quoted text
> /home/askdna/perl5/perlbrew/perls/perl-5.12.1/lib/site_perl/5.12.1 >
/home/askdna/perl5/perlbrew/perls/perl-5.12.1/lib/5.12.1/i686-linux-thread-multi Show quoted text
> /home/askdna/perl5/perlbrew/perls/perl-5.12.1/lib/5.12.1 > .
Subject: sample.yaml
name: MedicalCoding::Web uploaddir: __HOME__/upload uploadtmp: __HOME__/upload/tmp downloaddir: __HOME__/download "View::TT": DEFAULT_ENCODING: UTF-8 ENCODING: UTF-8 "Unicode::Encoding": encoding: UTF-8 "Model::API": class: 'MedicalCoding::API' args: medicalcoding: dsn: 'DBI:mysql:medical-coding:127.0.0.1' username: medicalcoding password: medicalcoding attributes: RaiseError: 1 AutoCommit: 1 mysql_enable_utf8: 1 on_connect_do: - SET NAMES utf8 cache_file: '__HOME__/cache/medicalcoding.cache' meddra: dsn_v131: dsn : 'DBI:mysql:database=meddra-v131;host=127.0.0.1' username: 'username' password: 'password' dsn_v140: dsn : 'DBI:mysql:database=meddra-v140;host=127.0.0.1' username: 'username' password: 'password' cache_file_v131: '__HOME__/cache/v131.cache' cache_file_v140: '__HOME__/cache/v140.cache' log_level: DEBUG "Plugin::Authentication": default_realm: members realms: members: credential: class: Password password_field: password password_type: clear store: class: 'Fey::ORM' user_model: 'MedicalCoding::Model::User' id_field: username role_relation: roles role_field: name
On Wed Mar 30 01:57:41 2011, KEEDI wrote: Show quoted text
> Catalyst::Model::Adaptor 0.10 could not parse config file correctly. > Before 0.10(0.09), attached config file was parsed well. So I am using > follow patch to workaround this problem. This is just a quick and > dirty > approach and I don't know this is a right way to fix this bug. > > Thanks. > > diff -urN a/Catalyst/Model/Adaptor/Base.pm > b/Catalyst/Model/Adaptor/Base.pm > --- a/Catalyst/Model/Adaptor/Base.pm 2011-03-30 14:49:20.038564000 > +0900 > +++ b/Catalyst/Model/Adaptor/Base.pm 2011-03-30 14:48:46.094564001 > +0900 > @@ -31,8 +31,8 @@ > my ($self, $app, $arg) = @_; > return exists $self->{args} ? { > %{$self->{args}}, > - %$arg, > - } : $arg; > + %{$arg->{args}}, > + } : $arg->{args}; > }
I'm not entirely sure what's going on here. Can you let me know the values of Data::Dumper::Dumper($arg) and Data::Dumper::Dumper($self->{$args});
Since I have just stumbled upon the same problem I have prepared the data you have been asking for. Hope that helps... Cheers Marko config ====== Model::Memcache: class: Web::Reload::Class::Cache::Memcached::Fast args: servers: - '127.0.0.1:11211' namespace: 'reload:development:' connect_timeout: 0.2 io_timeout: 0.5 close_on_error: 1 compress_threshold: 10000 compress_ratio: 0.9 compress_methods: - 'IO::Compress::Gzip::gzip' - 'IO::Uncompress::Gunzip::gunzip' max_failures: 3 failure_timeout: 2 nowait: 1 hash_namespace: 1 serialize_methods: - 'Storable::freeze' - 'Storable::thaw' utf8: 1 max_size: 131072 Dumper in Catalyst::Model::Adaptor::Base::prepare_arguments() ========================================================= ==== $self = bless( { 'args' => { 'max_failures' => 3, 'connect_timeout' => '0.2', 'namespace' => 'reload:development:', 'compress_threshold' => 10000, 'utf8' => 1, 'compress_ratio' => '0.9', 'failure_timeout' => 2, 'hash_namespace' => 1, 'nowait' => 1, 'compress_methods' => [ 'IO::Compress::Gzip::gzip', 'IO::Uncompress::Gunzip::gunzip' ], 'servers' => [ '127.0.0.1:11211' ], 'serialize_methods' => [ 'Storable::freeze', 'Storable::thaw' ], 'io_timeout' => '0.5', 'close_on_error' => 1, 'max_size' => 131072 }, 'class' => 'Web::Reload::Class::Cache::Memcached::Fast', 'catalyst_component_name' => 'Web::Reload::Model::Memcache' }, 'Web::Reload::Model::Memcache' ); $app = 'Web::Reload'; $arg = { 'args' => { 'max_failures' => 3, 'connect_timeout' => '0.2', 'namespace' => 'reload:development:', 'compress_threshold' => 10000, 'utf8' => 1, 'compress_ratio' => '0.9', 'failure_timeout' => 2, 'hash_namespace' => 1, 'nowait' => 1, 'compress_methods' => [ 'IO::Compress::Gzip::gzip', 'IO::Uncompress::Gunzip::gunzip' ], 'servers' => [ '127.0.0.1:11211' ], 'serialize_methods' => [ 'Storable::freeze', 'Storable::thaw' ], 'io_timeout' => '0.5', 'close_on_error' => 1, 'max_size' => 131072 }, 'class' => 'Web::Reload::Class::Cache::Memcached::Fast', 'catalyst_component_name' => 'Web::Reload::Model::Memcache' }; $self->{args} HASH(0x6bfa0f8)