Grokbase
Topics Posts Groups | in
x
[ help ]

Jonas Alves (jonas...@gmail.com)

Profile | Posts (49)

User Information

Display Name:Jonas Alves
Partial Email Address:jonas...@gmail.com
Posts:
49 total
4 in Catalyst Framework Development
13 in Catalyst Framework
2 in catalyst@lists.scsys.co.uk
12 in DBIx::Class
1 in dbix-class@lists.scsys.co.uk
13 in HTML::FormFu
2 in HTML::FormFu
2 in HTML::Widget

5 Most Recent

All Posts
1) Jonas Alves [Dbix-class] Problems using a database function in the where clause
| +1 vote
Have you tried the other way around? -and => [ { '' => \'extract(year from age(NOW(),birthday))'},...
catalyst@lists.scsys.co.ukdbix-class@lists.scsys.co.uk
[ Profile | Reply to groups ] [ Flat  Thread  Threaded ]
On Tue, Jul 22, 2008 at 9:14 AM, Moritz Onken <onken@houseofdesign.de> wrote:
>
> Am 21.07.2008 um 15:01 schrieb Eden Cardim:
>
>> On Mon, Jul 21, 2008 at 4:59 AM, Moritz Onken <onken@houseofdesign.de>
>> wrote:
>>>
>>> But how can I rewrite my query to the other format without writing the
>>> raw
>>> sql where clause?
>>> Why is it not possible to write my query with as scalar ref:
>>>
>>> $rs->search({
>>> -and =>
>>>  [
>>> {\"extract(year from age(NOW(),birthday))" => 22},
>>>   {sex => "male"}
>>>  ]
>>> });

Have you tried the other way around?

-and =>  [
   { '' => \'extract(year from age(NOW(),birthday))'},
   {sex => "male"}
]

I couldn't understand what is the 22 doing there.

--
Jonas
2) Jonas Alves [Catalyst] Patch for Catalyst::Plugin::Unicode::Encoding
| +1 vote
No, you never should check the flag. See Miyagawa's post...
catalyst@lists.scsys.co.uk
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
On Tue, Mar 18, 2008 at 11:01 AM, Bill Moseley <moseley@hank.org> wrote:
> On Tue, Mar 18, 2008 at 03:38:06AM -0500, Jonathan Rockway wrote:
>  > * On Tue, Mar 18 2008, Bill Moseley wrote:
> > > The plugin decodes all parameters using:
>  > >
> > > $_ = $c->encoding->decode( $_, $CHECK ) for ( ref($value) ? @{$value} : $value );
>  > >
>  > >
> > > I'd think it would be wise to check to see if the string is already
>  > > decoded:
>  > >
> > > for ( ref($value) ? @{$value} : $value ) {
>  > >         next if Encode::is_utf8($_);
> > > $_ = $c->encoding->decode( $_, $CHECK );
>  > >     }
>  >
> > Never check is_utf8. Encode will do the right thing regardless of
>  > the internal representation of the string.
>  >
>
>  This is decoding, not encoding.
>
> Without testing is_utf8 and if the parameters are already decoded I
>  rightly get:
>
> [error] Caught exception in engine "Cannot decode string with wide
>     characters at
> /usr/local/share/perl/5.8.8/Catalyst/Plugin/Unicode/Encoding.pm
>     line 74."
>
>
>
> > http://blog.jrock.us/articles/Fuck%20the%20internal%20representation.pod
>
> Yes, checking is_ut8 before encoding doesn't make sense.
>
>

No, you never should check the flag. See Miyagawa's post
http://use.perl.org/~miyagawa/journal/35700.

--
Jonas
3) Jonas Alves Re: [Catalyst] Patch for Catalyst::Plugin::Unicode::Encoding
| +1 vote
No, you never should check the flag. See Miyagawa's post...
catalyst@lists.scsys.co.uk
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
On Tue, Mar 18, 2008 at 11:01 AM, Bill Moseley <moseley@hank.org> wrote:
> On Tue, Mar 18, 2008 at 03:38:06AM -0500, Jonathan Rockway wrote:
>  > * On Tue, Mar 18 2008, Bill Moseley wrote:
> > > The plugin decodes all parameters using:
>  > >
> > > $_ = $c->encoding->decode( $_, $CHECK ) for ( ref($value) ? @{$value} : $value );
>  > >
>  > >
> > > I'd think it would be wise to check to see if the string is already
>  > > decoded:
>  > >
> > > for ( ref($value) ? @{$value} : $value ) {
>  > >         next if Encode::is_utf8($_);
> > > $_ = $c->encoding->decode( $_, $CHECK );
>  > >     }
>  >
> > Never check is_utf8. Encode will do the right thing regardless of
>  > the internal representation of the string.
>  >
>
>  This is decoding, not encoding.
>
> Without testing is_utf8 and if the parameters are already decoded I
>  rightly get:
>
> [error] Caught exception in engine "Cannot decode string with wide
>     characters at
> /usr/local/share/perl/5.8.8/Catalyst/Plugin/Unicode/Encoding.pm
>     line 74."
>
>
>
> > http://blog.jrock.us/articles/Fuck%20the%20internal%20representation.pod
>
> Yes, checking is_ut8 before encoding doesn't make sense.
>
>

No, you never should check the flag. See Miyagawa's post
http://use.perl.org/~miyagawa/journal/35700.

--
Jonas

_______________________________________________
List: [email protected: Cat...@lists.scsys.co.uk]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
4) Jonas Alves [Catalyst] exceptions and chained actions
| +1 vote
Probably you need to catch it and call detach.
catalyst@lists.scsys.co.uk
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
On Tue, Mar 11, 2008 at 4:12 PM, Dami Laurent (PJ)
<laurent.dami@justice.ge.ch> wrote:
>
>
>
> Hi Catalysters,
>
> It seems that if an exception is raised in the entry point to an action
> chain, Catalyst still tries to forward to the other chain components,
> accumulating all exceptions into $c->errors.
>
> Is there a way to stop the chain at the first exception ?
>
> Thanks in advance,
>
>         Laurent Dami
>
>

Probably you need to catch it and call detach.

--
Jonas
5) Jonas Alves Re: [Catalyst] exceptions and chained actions
| +1 vote
Probably you need to catch it and call detach.
catalyst@lists.scsys.co.uk
[ Profile | Reply to group ] [ Flat  Thread  Threaded ]
On Tue, Mar 11, 2008 at 4:12 PM, Dami Laurent (PJ)
<laurent.dami@justice.ge.ch> wrote:
>
>
>
> Hi Catalysters,
>
> It seems that if an exception is raised in the entry point to an action
> chain, Catalyst still tries to forward to the other chain components,
> accumulating all exceptions into $c->errors.
>
> Is there a way to stop the chain at the first exception ?
>
> Thanks in advance,
>
>         Laurent Dami
>
>

Probably you need to catch it and call detach.

--
Jonas

_______________________________________________
List: [email protected: Cat...@lists.scsys.co.uk]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/

spacer
Profile | Posts (49)
Home > People > Jonas Alves