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