Re: stopping numification

[prev] [thread] [next] [Date index for 2005/05/24]

From: Matt S Trout
Subject: Re: stopping numification
Date: 16:01 on 24 May 2005
On Tue, May 24, 2005 at 04:46:49PM +0100, Simon Wistow wrote:
> I have a column, version, defined as varchar(255) but, when I do a 
> 
> 	MyThing->find_or_create({ name => $name, version => "$version"});
> 
> where $version is "1.0" then the value in the database is '1'.
> 
> If I do 
> 
> __PACKAGE__->add_trigger( before_set_version => 
> 	sub { my ($self, $value, $vals) = @_; ... } );
> 
> 
> then both $value and $vals->{version} are '1.0';
> 
> If I manually frig the DB to set the version to '1.0' then it's all 
> fine.

Mmm, possibly either CDBI or SQLite is trying something silly at the
quoting stage. DBI->trace(4) may be your friend here, as may be various
evil tricks padding the string or quoting it yourself. YMMV :)

        -- 
             Matt S Trout           Website: http://www.shadowcatsystems.co.uk
  Technical Director        E-mail:  mst (at) shadowcatsystems.co.uk
Shadowcat Systems Ltd.

(message missing)

stopping numification
Simon Wistow 15:46 on 24 May 2005

Re: stopping numification
Matt S Trout 16:01 on 24 May 2005

Re: stopping numification
Simon Wistow 16:31 on 24 May 2005

Re: stopping numification
Christopher Laco 17:13 on 24 May 2005

Re: stopping numification
Simon Wistow 10:47 on 25 May 2005

Re: stopping numification
William Ross 11:46 on 25 May 2005

Re: stopping numification
Simon Wistow 11:59 on 25 May 2005

Re: stopping numification
Dan Sully 14:09 on 25 May 2005

Re: stopping numification
Gordon Haverland 16:55 on 24 May 2005

Re: stopping numification
Simon Wistow 17:06 on 24 May 2005

Re: stopping numification
Gordon Haverland 22:43 on 24 May 2005

Re: stopping numification
Tony Bowden 11:57 on 25 May 2005

Generated at 20:11 on 05 Jun 2005 by mariachi v0.52