Re: [Catalyst] Paging thru a complex POSTed search -- HOWTO?

2010-06-04 Thread Bill Crawford
On 2 June 2010 18:56, w...@serensoft.com w...@serensoft.com wrote:
 Short version:
 Using [% c.req.uri_with({ page = pager.next_page }) %] is fine for a simple
 single-field search (where the form uses GET instead of POST)... but how do
 we PAGE through (and/or cache) a multi-field form search that uses POST?

What version of Catalyst::Runtime adds uri_with? Not found here using
Ubuntu Lucid Loser (5.80022) ...

___
List: Catalyst@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/


Re: [Catalyst] Paging thru a complex POSTed search -- HOWTO?

2010-06-04 Thread w...@serensoft.com
Bill -- We're running Catalyst::Runtime 5.80022 but uri_with comes via
Catalyst::Request which doesn't appear to have a $VERSION specified. This is
on Debian 5.0.4 (stable) but we've had to use CPAN to get more modern
versions of many of the Debian libraries to get around the uses NEXT which
is deprecated warnings.

Oleg -- that seems delightfully sneaky for a GET form, definitely worth
playing with. But how does that work the the $c-stash-{pager} paradigm to
skip to last page for example?

Stuart -- when you say you serialize the search form, are you using
Javascript to compress/encapsulate things before they go to the server for
unwrapping? And if you can elaborate more on the mechanics of 303-forwarding
from a POST handler to a GET handler (or share a link or two) I'd be most
appreciative.


On Fri, Jun 4, 2010 at 10:58 AM, Bill Crawford
billcrawford1...@gmail.comwrote:

 On 2 June 2010 18:56, w...@serensoft.com w...@serensoft.com wrote:
  Short version:
  Using [% c.req.uri_with({ page = pager.next_page }) %] is fine for a
 simple
  single-field search (where the form uses GET instead of POST)... but how
 do
  we PAGE through (and/or cache) a multi-field form search that uses POST?

 What version of Catalyst::Runtime adds uri_with? Not found here using
 Ubuntu Lucid Loser (5.80022) ...

 ___
 List: Catalyst@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/




-- 
will trillich
It's only by saying 'no' that you can concentrate on the things that are
really important. -- Steve Jobs
___
List: Catalyst@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/


Re: [Catalyst] Paging thru a complex POSTed search -- HOWTO?

2010-06-04 Thread Bill Crawford
On 4 June 2010 17:26, w...@serensoft.com w...@serensoft.com wrote:
 Bill -- We're running Catalyst::Runtime 5.80022 but uri_with comes via
 Catalyst::Request which doesn't appear to have a $VERSION specified. This is
 on Debian 5.0.4 (stable) but we've had to use CPAN to get more modern
 versions of many of the Debian libraries to get around the uses NEXT which
 is deprecated warnings.

It's OK, I span style=font-size: xx-small typo'd a line to say
$c-req-uri_with(...) and it gave me the helpfullest warning
:)/span

___
List: Catalyst@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/


[Catalyst] Catalyst::TraitFor::Model::DBIC::Schema::Replicated connect info

2010-06-04 Thread Bill Moseley
The docs show:

__PACKAGE__-config({
traits = ['Replicated']
connect_info =
['dbi:mysql:master', 'user', 'pass'],
replicants = [
['dbi:mysql:slave1', 'user', 'pass'],
['dbi:mysql:slave2', 'user', 'pass'],
['dbi:mysql:slave3', 'user', 'pass'],
],
balancer_args = {
  master_read_weight = 0.3
}
});

Shouldn't that be regular connect_info?

my %config = (
traits = ['Replicated'],
connect_info = {
dsn = 'dbi:mysql:master',
user = 'username',
pass = 'password',
},
replicants = [
{
dsn = 'dbi:mysql:slave1',
user = 'username',
pass = 'password',
},
{
dsn = 'dbi:mysql:slave1',
user = 'username',
pass = 'password',
},
],
balancer_args = {
  master_read_weight = 0.3
}
);

-- 
Bill Moseley
mose...@hank.org
___
List: Catalyst@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/


[Catalyst] Re: Catalyst::TraitFor::Model::DBIC::Schema::Replicated connect info

2010-06-04 Thread Bill Moseley
It would seem there's a coercion for the synopsis syntax.  So, I'm not clear
if I'm using it incorrectly or if there's a problem.

So, if I take the SYNOPSIS example:

my %data = (
traits = ['Replicated'],
connect_info =
['dbi:mysql:master', 'user', 'pass'],
replicants = [
['dbi:mysql:slave1', 'user', 'pass'],
['dbi:mysql:slave2', 'user', 'pass'],
['dbi:mysql:slave3', 'user', 'pass'],
],
balancer_args = {
  master_read_weight = 0.3
}
);

and convert to YAML:


balancer_args:
  master_read_weight: 0.3
connect_info:
  - dbi:mysql:master
  - user
  - pass
replicants:
  -
- dbi:mysql:slave1
- user
- pass
  -
- dbi:mysql:slave2
- user
- pass
  -
- dbi:mysql:slave3
- user
- pass
traits:
  - Replicated

Then try with my actual YAML:

balancer_args:
  master_read_weight: 0.3
connect_info:
  - dbi:Pg:dbname=test
  -
  -

replicants:
  -
- dbi:Pg:dbname=slave
-
-
traits:
  - Replicated


Use of uninitialized value $driver in concatenation (.) or string at
/usr/local/share/perl/5.10.0/DBIx/Class/Storage/DBI.pm line 935.
DBIx::Class::Storage::throw_exception(): Can't locate
DBIx/Class/Storage/DBI/.pm in @INC


The hash-base connect_info works fine.


-- 
Bill Moseley
mose...@hank.org
___
List: Catalyst@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/