Re: [Catalyst] FYI: Contracting possibilities

2008-05-14 Thread Peter Edwards
* On Tue, May 13 2008, Ian Docherty wrote:
 Ian Docherty always feels people who refer to themselves in the third 
 person are being pretentious, as in http://zenshadow.vox.com/profile/
 ;-)


http://www.linkedin.com/in/michaeljschultz
Michael Schultz CEO of GenMobi apparently doing social networking apps for
kidz on mobiles.
17 recommends on LinkedIn.com and linked to me by 9 people. Looks like a
genuine entrepreneur who forgot to use a spellchecker on his blog.

Regards, Peter
http://perl.dragonstaff.co.uk



___
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] Suggestions for CatalystX::Installer

2008-05-14 Thread Paul Cain
Here is output from Module::ScanDeps

#.pl file
'AutoLoader'   = '5.64',
'File::Spec'   = '3.2701',
'File::Spec::Unix' = '3.2701',
'Scalar::Util' = '1.19',
'inc::Module::Install' = '0.72',
'Cwd'  = '3.2701',
'List::Util'   = '1.19',
'Module::Install'  = '0.72',

#.pm file
'AutoLoader'= '5.64',
'Catalyst::Runtime' = '5.7012',
'parent'= '0.221',
'List::Util'= '1.19',
'Scalar::Util'  = '1.19',


On Wed, May 14, 2008 at 12:16 AM, Paul Cain [EMAIL PROTECTED] wrote:
 I've been examining everything, and was ponder about a few things:

  PAR looks like a great way to archive a Catalyst app, but it doesn't
  look like it is possible to un-archive it to where it is back to its
  original state in case some changes need to be made. Of course, that
  could be accomplished with a tar.gz file(created by make dist). I'm
  not sure if that is really a problem or not.

  It appears that all that CatalystX::Installer should need to deploy a
  database is a valid schema.

  After getting a list of required modules(using Module::ScanDeps), do I
  just add them to makefile.PL?



  On Mon, May 12, 2008 at 2:55 AM, Paul Cain [EMAIL PROTECTED] wrote:
   All of those modules and the suggestions look like they will be really
helpful, thanks for the input Jonathan and Kieren.
  
  
I still want support for GetOpt:: modules as well so that we can do all 
 this from the comand line.
  
Sounds good, the GetOpt:: modules should make command line arguments
rather trivial.
  
  
The opportunity here is for the whole thing to be done wrong first time 
 round so we know what to do for the subsequent iteration.  This is a 
 technique that is proven to work in technology development many times over 
 [2].
  
I guess I will be back here next year to fix my mistakes then.
  
  
  
On Mon, May 12, 2008 at 1:59 AM, Kieren Diment [EMAIL PROTECTED] wrote:

 On 12 May 2008, at 13:44, Jonathan Rockway wrote:


 Module::ScanDeps


 needs some configuration || filtering to make sense of it, and warn if
 Makefile.PL looks wrong

 make catalyst_par

 and improve the documentation here


 make installdeps

 DBICx::Deploy

 make test


 Provide some standard configuration for DBIx::Class models, and
 Catalyst::Model::File models so we get a sense of what's required for
 Catalyst::Model::Whatever to support catalystx::installer.  I think that
 View:: logic is probably ususally hard coded into the app, but i could 
 be
 wrong.

 Catalyst::Controller::REST for the CRUD stuff required (maybe) - 
 remember
 this originates in a (rejected[1]) google summer of code application, 
 so we
 need to provide learning opportunities as well as a final result.

 i still want support for GetOpt:: modules as well so that we can do all 
 this
 from the comand line.

 The opportunity here is for the whole thing to be done wrong first time
 round so we know what to do for the subsequent iteration.  This is a
 technique that is proven to work in technology development many times 
 over
 [2].

 [1] Rejected because google is a python shop and so the perl foundation
 didn't get enough slots, and the enlightened perl organisation 
 application
 was rejected this time round

 [2] Although unix looks like it doesn't conform to this, it was the
 licencing that unix got wrong mostly.

 ___
 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/

  


___
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] Suggestions for CatalystX::Installer

2008-05-14 Thread Andreas Marienborg


On May 14, 2008, at 7:16 AM, Paul Cain wrote:


I've been examining everything, and was ponder about a few things:

PAR looks like a great way to archive a Catalyst app, but it doesn't
look like it is possible to un-archive it to where it is back to its
original state in case some changes need to be made. Of course, that
could be accomplished with a tar.gz file(created by make dist). I'm
not sure if that is really a problem or not.

It appears that all that CatalystX::Installer should need to deploy a
database is a valid schema.

After getting a list of required modules(using Module::ScanDeps), do I
just add them to makefile.PL?



I would say that making sure the deps are correct would not be the job  
of CatalystX::Installer, but the developer of the app.


What I hope CatalystX::Installer will be, is something that I can use  
in my apps to make them easier to set up for people installing the app.


This for me includes:

- dependency handling
any deps the app needs, that isn't available, or the wrong version  
should be installed / helped installed. For instance, a debian user  
might want suggestions for debian packages to install (quite large  
scope :p) For me it should not infer deps automaticly at this time,  
that the developer should do before releasing his app.


- app configuration
Databases, paths, etc. This needs to be very customizable/pluggable.  
For instance in easycms2, I have a config setting for what resizes to  
make of pictures. It would be classy if I could easily map this to  
some webform using CatalystX::Installer :p


- schema deployment / upgrades
Deploy or upgrade the given database-configuration. This sort of  
infers that the CatalystX::Installer also can be used for upgrades :p


- example configurations
For apache, lighty, nginx, perlbal(?), http-server, fastcgi etc.
Perhaps it could even go as far as trying to put config under the  
propper /etc/apache/conf-enabled or whatever (this becomes distro- 
specific, and probably needs to be pluggable)


- Running tests.
This I think is a cool idea, to optionally run tests against the  
finished setup. The author should perhaps specify which tests to run



- andreas


___
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] FYI: Contracting possibilities

2008-05-14 Thread Mitch Jackson
 Stephen Sykes thinks everyone should use jobs.perl.org for legit gigs.

 Here's a cat gig posted recently - http://jobs.perl.org/job/8668

 [stephen]

Not to be confused with jobs.perl.com, at $79/month for a job listing

/mitch

___
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] Output as XML

2008-05-14 Thread Mitch Jackson
Good morning!

I'm about to start working on some DBIC query to XML code, but before
I do I was wondering if anybody out there has already done this, or if
perhaps my approach is thick-headed.

I'm generating XML from database queries in a catalyst app.  At the
moment, I am doing it a bit like this (simplified for readability):

-
# controller.pm  /controller/action/parm1/parm2/parm3/something.xml
sub action : Local {
  ...
  $c-stash-{records} = [ $c-model('table')-search( {}, { rows =
20, page 2 } ) ];
  $c-res-content_type('text/xml');
  $c-.res-header('Content-disposition' = 'attachment;
filename=action_${timestamp}.xml');
  $c-res-template('xml/action.xml');
}

# xml/action.xml
?xml version=1.0 encoding=utf-8 ?
records
[% FOREACH record IN records -%]
record id=[% record.id %]
  field1[% record.field1 %]/field1
  field2[% record.field2 %]/field2
  field3[% record.field3 %]/field3
/record
[% END # foreach record -%]
/records
---

This approach works fine for paged record sets ( that get loaded into
an ExtJS ajax grid ).  When I use this on a record set of 15k-16k
records, the app goes to 100% CPU and cannot complete the request
after several minutes.  There is a lot of overhead to generate 16k
DBIC objects, dump them in an array, and then manipulate them through
TT.

This speed problem is unacceptable for my app, especially considering
my users may be dealing with much larger datasets than this.

One solution would be to write something proprietary to this
implementation as a module that would throw away the overhead bloat
and generate the XML file efficiently... but I want something reusable
in the long term from a catalyst perespective.

I am considering writing some sort of DBIC query to XML code that
would use the DBI cursor directly to bypass object creation and build
the XML while looping through the results.
(http://search.cpan.org/~ash/DBIx-Class-0.08010/lib/DBIx/Class/Manual/Cookbook.pod#Get_raw_data_for_blindingly_fast_results)

An interface like this:
my $xml = $c-model('table')-xml( \%filter_parms, \%dbic_opts )

That would generate output like this
?xml version=1.0 encoding=utf-8 ?
records
record id=42
  field1don't panic/field1
  field2vogon poetry/field2
  field3see if i don't/field3
/record
...
/records

The questions I pose are this:
- Is there something already out there that does what I need?
- Is there a big problem with my approach?
- Would anybody else be interested in this if I get it working?


Kind Regards,

/Mitchell K. Jackson

___
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] C::P::UploadProgress

2008-05-14 Thread Octavian Rasnita

Hi,

Can C::P::UploadProgress be made to work under Windows?
I've seen that it requires C::P::Cache::FastMmap and this module can't be 
installed under Windows, even after installing Cache::FastMmap::WithWin32.


Thank you.

Octavian


___
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] C::P::UploadProgress

2008-05-14 Thread Ash Berlin

On 14 May 2008, at 15:32, Octavian Rasnita wrote:


Hi,

Can C::P::UploadProgress be made to work under Windows?
I've seen that it requires C::P::Cache::FastMmap and this module  
can't be installed under Windows, even after installing  
Cache::FastMmap::WithWin32.


Thank you.

Octavian



Doesn't work how? Build errors? Just plain doesn't work?

___
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] C::P::UploadProgress

2008-05-14 Thread Andy Grundman


On May 14, 2008, at 10:32 AM, Octavian Rasnita wrote:


Hi,

Can C::P::UploadProgress be made to work under Windows?
I've seen that it requires C::P::Cache::FastMmap and this module  
can't be installed under Windows, even after installing  
Cache::FastMmap::WithWin32.


It will work with any cache plugin.

___
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] Post-login redirection problem

2008-05-14 Thread Dr. Jennifer Nussbaum
Hi,

I just upgraded some packages on my server, including some versions of Catalyst.
Now Im getting problems after i log in a user. Im using the RequireSSL plugin, 
but
now, after a user logs in successfully, instead of going to 
http://www.mysite.com/myapp/, it goes to 
http://www.mysite.com:443/myapp/user/http://www.mysite.com/myapp. And then
I get the message Bad Request...your speaking plain HTTP to an SSL-enabled 
server port. Instead use the HTTPS scheme to access this URL, please.

How do i fix this? My login routines are simple and mostly copied from the docs.

Thanx!

Jen

   ___
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] Post-login redirection problem

2008-05-14 Thread Bill Moseley
On Wed, May 14, 2008 at 08:29:00AM -0700, Dr. Jennifer Nussbaum wrote:
 Hi,
 
 I just upgraded some packages on my server, including some versions
 of Catalyst.  Now Im getting problems after i log in a user. Im
 using the RequireSSL plugin, but now, after a user logs in
 successfully, instead of going to http://www.mysite.com/myapp/, it
 goes to
 http://www.mysite.com:443/myapp/user/http://www.mysite.com/myapp.
 And then I get the message Bad Request...your speaking plain HTTP
 to an SSL-enabled server port. Instead use the HTTPS scheme to
 access this URL, please.

Sure you didn't end up down-grading Catalyst::Engine::Apache?

At one point it only would remove port 80 but in recent versions it
removes both 80 and 443:

   if ( $port !~ /^(?:80|443)$/  $host !~ /:/ ) {
$host .= :$port;
}

The old version would have left the 443 on the url.

My version has this, but I think I added that to my copy of 1.11

unless ( $host =~ /:/ ) {
$host .= :$port
if ( $c-req-secure  $port != 443 )
|| ( !$c-req-secure  $port != 80 )
}


Hum, I see I have a hacked version of RequireSSL that creates a URI
object and then sets:

$uri-scheme( $scheme );
$uri-port( undef );

if I don't have a secure and non-secure host setup in my config (i.e.
my host name is same for ssl and non-ssl).




-- 
Bill Moseley
[EMAIL PROTECTED]


___
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] C::P::UploadProgress

2008-05-14 Thread Octavian Rasnita

From: Ash Berlin [EMAIL PROTECTED]

Can C::P::UploadProgress be made to work under Windows?
I've seen that it requires C::P::Cache::FastMmap and this module  can't 
be installed under Windows, even after installing 
Cache::FastMmap::WithWin32.


Thank you.

Octavian



Doesn't work how? Build errors? Just plain doesn't work?


I enclosed below the errors I've seen when doing:
cpan install Catalyst::Plugin::Cache::FastMmap

I think this module require Cache::FastMmap and it gives errors if it is not 
found. It might need to try require-ing Cache::FastMmap but if it is not 
found, try require-ing Cache::FastMmap::WithWin32.


The errors:
E:\usr\bin\perl.exe Build --makefile_env_macros 1
Copying lib\Catalyst\Plugin\Cache\FastMmap.pm - 
blib\lib\Catalyst\Plugin\Cache\FastMmap.pm
Manifying blib\lib/Catalyst/Plugin/Cache/FastMmap.pm - 
blib\libdoc\Catalyst.Plugin.Cache.FastMmap.3
HTMLifying blib\lib\Catalyst\Plugin\Cache\FastMmap.pm - 
blib\libhtml\site\lib\Catalyst\Plugin\Cache\FastMmap.html
Build: blib\lib\Catalyst\Plugin\Cache\FastMmap.pm: cannot resolve 
LCatalyst in paragraph 24.
Build: blib\lib\Catalyst\Plugin\Cache\FastMmap.pm: cannot resolve 
LCatalyst in paragraph 32.

nmake  -- OK
Running make test
Microsoft (R) Program Maintenance Utility Version 8.00.50727.42
Copyright (C) Microsoft Corporation. All rights reserved.
E:\usr\bin\perl.exe Build --makefile_env_macros 1 test
t\01use
t\01useNOK 1#   Failed test 'use 
Catalyst::Plugin::Cache::FastMmap;'

#   at t\01use.t line 3.
# Tried to use 'Catalyst::Plugin::Cache::FastMmap'.
# Error:  Can't locate Cache/FastMmap.pm in @INC (@INC contains: 
E:\usr\cpan\build\Catalyst-Plugin-Cache-FastMmap-0.6\blib\lib 
E:\usr\cpan\build\Catalyst-Plugin-
Cache-FastMmap-0.6\blib\arch _build\lib E:/usr/site/lib E:/usr/lib .) at 
E:\usr\cpan\build\Catalyst-Plugin-Cache-FastMmap-0.6\blib\lib/Catalyst/Plugin/Cache/FastMmap

.pm line 6.
# BEGIN failed--compilation aborted at 
E:\usr\cpan\build\Catalyst-Plugin-Cache-FastMmap-0.6\blib\lib/Catalyst/Plugin/Cache/FastMmap.pm 
line 6.

# Compilation failed in require at (eval 2) line 2.
# BEGIN failed--compilation aborted at (eval 2) line 2.
# Looks like you failed 1 test of 1.
t\01usedubious
Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 1
Failed 1/1 tests, 0.00% okay
t\02podskipped
all skipped: set TEST_POD to enable this test
t\03podcoverageskipped
all skipped: Test::Pod::Coverage 1.04 required
Failed Test Stat Wstat Total Fail  Failed  List of Failed
---
t\01use.t  1   256 11 100.00%  1
2 tests skipped.
Failed 1/3 test scripts, 66.67% okay. 1/1 subtests failed, 0.00% okay.
NMAKE : fatal error U1077: 'E:\usr\bin\perl.exe' : return code '0xff'
Stop.
nmake test -- NOT OK
Running make install
make test had returned bad status, won't install without force
cpan


Octavian


___
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] Post-login redirection problem

2008-05-14 Thread Dr. Jennifer Nussbaum


Bill Moseley [EMAIL PROTECTED] wrote: On Wed, May 14, 2008 at 08:29:00AM 
-0700, Dr. Jennifer Nussbaum wrote:
 Hi,
 
 I just upgraded some packages on my server, including some versions
 of Catalyst.  Now Im getting problems after i log in a user. Im
 using the RequireSSL plugin, but now, after a user logs in
 successfully, instead of going to http://www.mysite.com/myapp/, it
 goes to
 http://www.mysite.com:443/myapp/user/http://www.mysite.com/myapp.
 And then I get the message Bad Request...your speaking plain HTTP
 to an SSL-enabled server port. Instead use the HTTPS scheme to
 access this URL, please.

Sure you didn't end up down-grading Catalyst::Engine::Apache?

At one point it only would remove port 80 but in recent versions it
removes both 80 and 443:Hey, i must have missed that for some reason. Upgrading 
fixes the port problem.

But i do still have the double-URL problem which may be something im doing.
(But it did change recnetly)

My login system (i copied this from somewhere) works like this: in my Root
controller, if there's no user, i set

  $c-session-{original_uri} = $c-req-uri;

and then i redirect to the login page. Then in the login routine, if the login 
is successful:

  my $redirect = $c-session-{original_uri};
  $c-session-{original_uri} = undef;
  $c-res-redirect( $c-uri_for($redirect)); # stringify

But this redirects to something with that weird double URL (but without the 443
problem at least).

Is this something thats changed recently? What should i be doing to get this 
behaviour?

Thanx again!

Jen

   ___
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] please take me off your list

2008-05-14 Thread sellhigh
I signed up for this system this afternoon and already have had several e-mails 
from people who have had enormous difficulties trying to access the system. 
Life is too short to get involved in this so please take me off your mailing 
list
kind regards
Don

--
I am using the free version of SPAMfighter for private users.
It has removed 154 spam emails to date.
Paying users do not have this message in their emails.
Get the free SPAMfighter here: http://www.spamfighter.com/len
___
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] please take me off your list

2008-05-14 Thread Andy Armstrong

On 14 May 2008, at 16:00, sellhigh wrote:
I signed up for this system this afternoon and already have had  
several e-mails from people who have had enormous difficulties  
trying to access the system. Life is too short to get involved in  
this so please take me off your mailing list

kind regards


Go here:

http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst

and you can unsub yourself.

--
Andy Armstrong, Hexten





___
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] Issue with Catalyst:Can't locate object method get_user via package Catalyst::Plugin::Authentication::Store::DBIC

2008-05-14 Thread kakimoto

hi, there,

 i have installed catalyst  and done a few of the tutes you have put on
the net on my macbook.
Runs great. i am using a Postgresql db backend.


I am now doing the authentication tutorial and have been stuck in a bad
error for ages.

[error] Caught exception in gozila::Controller::Login-
index Can't locate object method get_user via package
Catalyst::Plugin::Authentication::Store::DBIC at
/Library/Perl/5.8.8/Catalyst/Authentication/Realm.pm line 85.



 I have tried looking at the source codes of the packages indicated in
the error, reinstalled the packages via perl -MCPAN -eshell and it
still fails.

Please help me.

___
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] Output as XML

2008-05-14 Thread Russell Jurney
Have you thought about using this: http://search.cpan.org/~sri/ 
Catalyst-View-REST-XML-0.01/XML.pm with raw data to achieve the  
desired speed?  Not sure where your bottleneck is, but if TT is a  
problem then I assume XML::Simple is faster than TT to serialize XML?


Russell Jurney
[EMAIL PROTECTED]



On May 14, 2008, at 10:02 AM, Mitch Jackson wrote:


Good morning!

I'm about to start working on some DBIC query to XML code, but before
I do I was wondering if anybody out there has already done this, or if
perhaps my approach is thick-headed.

I'm generating XML from database queries in a catalyst app.  At the
moment, I am doing it a bit like this (simplified for readability):

-
# controller.pm  /controller/action/parm1/parm2/parm3/something.xml
sub action : Local {
  ...
  $c-stash-{records} = [ $c-model('table')-search( {}, { rows =
20, page 2 } ) ];
  $c-res-content_type('text/xml');
  $c-.res-header('Content-disposition' = 'attachment;
filename=action_${timestamp}.xml');
  $c-res-template('xml/action.xml');
}

# xml/action.xml
?xml version=1.0 encoding=utf-8 ?
records
[% FOREACH record IN records -%]
record id=[% record.id %]
  field1[% record.field1 %]/field1
  field2[% record.field2 %]/field2
  field3[% record.field3 %]/field3
/record
[% END # foreach record -%]
/records
-- 
-


This approach works fine for paged record sets ( that get loaded into
an ExtJS ajax grid ).  When I use this on a record set of 15k-16k
records, the app goes to 100% CPU and cannot complete the request
after several minutes.  There is a lot of overhead to generate 16k
DBIC objects, dump them in an array, and then manipulate them through
TT.

This speed problem is unacceptable for my app, especially considering
my users may be dealing with much larger datasets than this.

One solution would be to write something proprietary to this
implementation as a module that would throw away the overhead bloat
and generate the XML file efficiently... but I want something reusable
in the long term from a catalyst perespective.

I am considering writing some sort of DBIC query to XML code that
would use the DBI cursor directly to bypass object creation and build
the XML while looping through the results.
(http://search.cpan.org/~ash/DBIx-Class-0.08010/lib/DBIx/Class/ 
Manual/Cookbook.pod#Get_raw_data_for_blindingly_fast_results)


An interface like this:
my $xml = $c-model('table')-xml( \%filter_parms, \%dbic_opts )

That would generate output like this
?xml version=1.0 encoding=utf-8 ?
records
record id=42
  field1don't panic/field1
  field2vogon poetry/field2
  field3see if i don't/field3
/record
...
/records

The questions I pose are this:
- Is there something already out there that does what I need?
- Is there a big problem with my approach?
- Would anybody else be interested in this if I get it working?


Kind Regards,

/Mitchell K. Jackson

___
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/



___
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/