Re: [Catalyst] Apache's

2009-04-15 Thread Ben Vinnerd

Thanks Charlie. That will do me  :)

Ben


Charlie Garrison wrote:

Good morning,

On 15/04/09 at 1:24 PM +0100, Ben Vinnerd  
wrote:


I pass a flag to Apache when i start it up, e.g. -Dhello. Any ideas 
how i can check this from within a Catalyst app?


If using mod_perl, then inside your IfDefine block, do a PerlSetEnv 
(or maybe a PerlSetVar), eg:


PerlSetEnv SERVER_MODE "test"

And then just check for key %ENV to see if the -D flag was applicable 
for that request.


The same technique should work with fast_cgi but you'll need to use 
SetEnv rather than PerlSetEnv (unless fast_cgi has PerlSetEnv 
equivalent).


Charlie



___
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] Tutorial for cache?

2009-04-15 Thread Alexander Tamm

Tomas Doran wrote:

Take a look at Catalyst::Plugin::Cache. The docs are a bit crap (patches 
welcome!), but it'll do what you want, and has nice features to give you 
curried accessors for things etc..


Well, that's just it... I've read the docs and tried to configure it, 
but I never get a cache hit.


I've tried this:

in MyApp.pm:
__PACKAGE__->config(
# other stuff.
'Plugin::Cache' => {
  'backend' => {
   store => 'FastMmap',
  },
 },
);
...but the return value of $c->cache->get->($key) is always undef, 
although I make sure to always $c->cache->set( $key, $value)


So I'm pretty sure I've missed something.

Alex

--
Alexander Tamm
Developer
FRANTIC | http://www.frantic.com

a...@frantic.com


___
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] PAR file - can't build it . Prolly documentation is out of date?

2009-04-15 Thread kakimoto


Hi there,
 I refered to http://catalyst.infogami.com/cookbook/par. I can't seem to
find the line,
"catalyst_files();".
  How do you guys get your PAR files made?

I assume that par files will get the new server which I want to install
my application to launch CPAN shell to install the extra modules it
needs?   



thank you.


This is my Makefile.pm


-
use inc::Module::Install;

name 'myApp';
all_from 'lib/myApp.pm';

requires 'Catalyst::Runtime' => '5.7012';
requires 'Catalyst::Plugin::ConfigLoader';
requires 'Catalyst::Plugin::Static::Simple';
requires 'Catalyst::Action::RenderView';
requires 'parent';
requires 'YAML'; # This should reflect the config file format you've chosen
 # See Catalyst::Plugin::ConfigLoader for supported formats
catalyst;
catalyst_par_core();   # Include modules that are also included
   # in the standard Perl distribution,
   # this is optional but highly suggested

catalyst_par();# Generate a PAR as soon as the blib
   # directory is ready


install_script glob('script/*.pl');
auto_install;
WriteAll;
-

___
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] Keep getting checksum mismatch problems each time I regenerate my schema files

2009-04-15 Thread kakimoto

Hello all,


   I keep getting a checksum mismatch problems each time I regenerate my
schema files.

What's the most common fault and solution? I really don't know why..

For reference, my command was:

script/myapp_create.pl model myAppDB DBIC::Schema gozila::Schema
create=static  dbi:Pg:dbname=myDatabaseForTheApplication  my-user
my-password



I do check my files into GIT after generating them each time. Could this
be the cause? Anyone with the same issue?

thank you.



k. akimoto

___
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] Catalyst-Ajax-Mochikit - followed tute but am stuck. Cannot show values in view(webpage)

2009-04-15 Thread kakimoto
Hello, Ali,

 Thank you very much for coming back to this post.

At the moment, I have just used a simple  tag and it
works great. Once I do more work on AJAX, I will put your suggestions in.

K . akimoto

Quoting "Mesdaq, Ali" :

> Hello,
> 
> I am the one who wrote that article sorry if it wasn’t clear enough
> to help you out here. Looking at the code you pasted I see a few
> places where I think the issue might be.
> 
> In your subscriptions_quote.js file you don’t have the price element
> defined like in my example. What you need is a reference to the
> element and you don’t have one. So add something like var price =
> getElement('price'); right under your var check_price =
> getElement('check_price');. That will give you a reference to that
> element that you will need when you call replaceChildNodes later.
> Also a minor change you could add is change p_txt =
> P({'style':'display:none'}, resp.data.price); to var p_txt =
> P({'style':'display:none'}, resp.data.price);. 
> 
> One of the debugging steps you can take with firebug is to actually
> watch the DOM get updated. If you right click somewhere on the page
> that’s close to where your price data will be displayed you can
> select "Inspect Element" then navigate to where the element will be
> created. Its possible that the element gets added to the DOM but you
> have an issue with the appear() function so it never displays even
> though its been inserted with the replaceChildNodes() that has
> happened to me many times before.
> 
> Also after you do var p_txt = P({'style':'display:none'},
> resp.data.price); I would do a console.log(p_txt); Just to dump that
> DOM element and make sure its being created correctly with the
> correct data as well as the correct attributes. You might even want
> to not have it be set to display none so that you can take the whole
> visual affect issues out of the debugging.
> 
> Please let me know if this helps I am very interested in making sure
> the issue is resolved based on the instructions I gave in the
> tutorial instead of other work arounds.
> 
> Thanks,
> --
> Ali Mesdaq (CISSP, GIAC-GREM)
> Sr. Security Researcher
> Websense Security Labs
> http://www.WebsenseSecurityLabs.com
> --
> 
> 
> -Original Message-
> From: kakim...@tpg.com.au [mailto:kakim...@tpg.com.au] 
> Sent: Sunday, April 12, 2009 8:50 PM
> To: The elegant MVC web framework
> Subject: [Catalyst] Catalyst-Ajax-Mochikit - followed tute but am
> stuck. Cannot show values in view(webpage)
> 
> hi everybody :)
> 
>  Referring to  http://www.catalystframework.org/calendar/2008/24, I
> have
> made a small change to my app and tried developing it with AJAX.
> 
> What's successful:
> =
> 
> *) managed to make a call to my controller - i put in a
> $c->log->debug(
> ... ) statement and saw that come up fine
> 
> 
> What I have done to check:
> =
> 
> *) Used Firebug on firefox to check the returned object.
> 
> 
> 
> Looks good in that it has 
> =
> 1) 'status'='Successful'
> 2) 'data' hash ref which even has 'price' => 'the value i expected'.
> 
> 
> How do I actually get the value (which is the 'price' attribute to
> display)?
> Point of problem: addCallBack method in my javascript file.
> 
> Where an I stuck:
> =
> *) can't seem to display values returned from JSON be it via span or
> a
> html table.
> All I wanted to do was to get my controller to pass out a 'price'
> value.
> 
> 
> 
> here are my files:
> 
> 
> the only template, 'form.tt2'
> --
> 
> 
> 
> 
> [% FOREACH error IN errors %]
> [% error %]
> [% END %]
> 
> 
> 
> [% END %]
> 
> 
> 
> 
> insurance duration:
> 
> 
>  id="duration" name = "duration"/>
> 
> 
> 
> 
> 
> 
> Price
> 
> 
>  id="price">
>  id="check_price" name="check_price" value="check price"/>
>  type="text/javascript" src="[%
> Catalyst.uri_for('/js/subscriptions_quote.js') %]">
> 
> 

[Catalyst] Advice Needed on Masking Sensitive Content from Logs

2009-04-15 Thread Ewan Edwards
Hi,

I have a Catalyst app, running 5.7011, and I keep the debugging log turned
on as the parameters and sequence of events is far more useful than the disk
space and request overhead, at least currently.

Recently, I've had to start accepting credit cards. I'm required to not log
them, but I'd also like to keep the debug log going. So, I've copied
Catalyst.pm's prepare_body() method into MyApp.pm, and added the following
line to the block which prepares the Text::SimpleTable output for the log:

my $t = Text::SimpleTable->new( [ 35, 'Parameter' ], [ 36, 'Value' ]
);
for my $key ( sort keys %{ $c->req->body_parameters } ) {
my $param = $c->req->body_parameters->{$key};
my $value = defined($param) ? $param : '';
+  $value = (grep { $key eq $_ } qw(cardnumber password)) ?
'' : $value;
$t->row( $key,
ref $value eq 'ARRAY' ? ( join ', ', @$value ) : $value );
}

As you can see, I've taken the opportunity to mask the password from the log
too.

My question is: is there a better, or more Catalyst-approved way of
accomplishing this? This seemed to be the most direct/simple way, but it
would have been nice if the Text::SimpleTable stuff was in a method of its
own.

Thanks,

-- 
Ewan Edwards, eskwa...@gmail.com
___
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/


Fwd: [Catalyst] Tutorial for cache?

2009-04-15 Thread Peter Edwards
2009/4/15 Tomas Doran 
>
> On 15 Apr 2009, at 07:23, Alexander Tamm wrote:
>
>> J. Shirley wrote:
>>
>>>I'm trying to find out how to implement caching on a site,
>>>preferrably with Cache::FastMmap, but I'm open to suggestions. I'm
>>>not including my trial source now, since I'm unsure I have read the
>>>correct documentation.
>>>
>>
>>  Catalyst::Plugin::PageCache?
>>>
>>
>> Thanks, but I want to cache values that are the result of expensive
>> database queries, preferrably a a hash reference.
>>
>
> Take a look at Catalyst::Plugin::Cache. The docs are a bit crap (patches
> welcome!), but it'll do what you want, and has nice features to give you
> curried accessors for things etc..
>
> I'd personally combine that with Cache::Memcached, but you can use whatever
> Cache:: backend you want.
>
> Cheers
> t0m
>

For sure, use memcached. You should also try and cache everywhere, at the db
access level, at the business object level, page fragments and also pages.
There are some good papers here: http://highscalability.com/tags/memcached

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] Tutorial for cache?

2009-04-15 Thread Tomas Doran


On 15 Apr 2009, at 07:23, Alexander Tamm wrote:


J. Shirley wrote:

I'm trying to find out how to implement caching on a site,
preferrably with Cache::FastMmap, but I'm open to suggestions.  
I'm
not including my trial source now, since I'm unsure I have  
read the

correct documentation.



Catalyst::Plugin::PageCache?


Thanks, but I want to cache values that are the result of expensive  
database queries, preferrably a a hash reference.


Take a look at Catalyst::Plugin::Cache. The docs are a bit crap  
(patches welcome!), but it'll do what you want, and has nice features  
to give you curried accessors for things etc..


I'd personally combine that with Cache::Memcached, but you can use  
whatever Cache:: backend you want.


Cheers
t0m


___
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] Catalyst-Ajax-Mochikit - followed tute but am stuck. Cannot show values in view(webpage)

2009-04-15 Thread Mesdaq, Ali
Hello,

I am the one who wrote that article sorry if it wasn’t clear enough to help you 
out here. Looking at the code you pasted I see a few places where I think the 
issue might be.

In your subscriptions_quote.js file you don’t have the price element defined 
like in my example. What you need is a reference to the element and you don’t 
have one. So add something like var price = getElement('price'); right under 
your var check_price = getElement('check_price');. That will give you a 
reference to that element that you will need when you call replaceChildNodes 
later. Also a minor change you could add is change p_txt = 
P({'style':'display:none'}, resp.data.price); to var p_txt = 
P({'style':'display:none'}, resp.data.price);. 

One of the debugging steps you can take with firebug is to actually watch the 
DOM get updated. If you right click somewhere on the page that’s close to where 
your price data will be displayed you can select "Inspect Element" then 
navigate to where the element will be created. Its possible that the element 
gets added to the DOM but you have an issue with the appear() function so it 
never displays even though its been inserted with the replaceChildNodes() that 
has happened to me many times before.

Also after you do var p_txt = P({'style':'display:none'}, resp.data.price); I 
would do a console.log(p_txt); Just to dump that DOM element and make sure its 
being created correctly with the correct data as well as the correct 
attributes. You might even want to not have it be set to display none so that 
you can take the whole visual affect issues out of the debugging.

Please let me know if this helps I am very interested in making sure the issue 
is resolved based on the instructions I gave in the tutorial instead of other 
work arounds.

Thanks,
--
Ali Mesdaq (CISSP, GIAC-GREM)
Sr. Security Researcher
Websense Security Labs
http://www.WebsenseSecurityLabs.com
--


-Original Message-
From: kakim...@tpg.com.au [mailto:kakim...@tpg.com.au] 
Sent: Sunday, April 12, 2009 8:50 PM
To: The elegant MVC web framework
Subject: [Catalyst] Catalyst-Ajax-Mochikit - followed tute but am stuck. Cannot 
show values in view(webpage)

hi everybody :)

 Referring to  http://www.catalystframework.org/calendar/2008/24, I have
made a small change to my app and tried developing it with AJAX.

What's successful:
=

*) managed to make a call to my controller - i put in a $c->log->debug(
... ) statement and saw that come up fine


What I have done to check:
=

*) Used Firebug on firefox to check the returned object.



Looks good in that it has 
=
1) 'status'='Successful'
2) 'data' hash ref which even has 'price' => 'the value i expected'.


How do I actually get the value (which is the 'price' attribute to display)?
Point of problem: addCallBack method in my javascript file.

Where an I stuck:
=
*) can't seem to display values returned from JSON be it via span or a
html table.
All I wanted to do was to get my controller to pass out a 'price' value.



here are my files:


the only template, 'form.tt2'
--




[% FOREACH error IN errors %]
[% error %]
[% END %]



[% END %]




insurance duration:









Price











the javascript, subscriptions_quote.js
--

//Creates MochiKit logging pane. Remove "true" if you want it popped out
in its own window
createLoggingPane(true);

var message = getElement('message');
var error = getElement('error');
var duration = getElement('duration');
var check_price = getElement('check_price');

connect
(
'check_price',
'onclick',
function ()
{
log("I have been clicked and here are my values:");
log("Duration: ", duration.value);

//Creating our params obje

Re: [Catalyst] Apache's

2009-04-15 Thread Charlie Garrison

Good morning,

On 15/04/09 at 1:24 PM +0100, Ben Vinnerd 
 wrote:


I pass a flag to Apache when i start it up, e.g. -Dhello. Any 
ideas how i can check this from within a Catalyst app?


If using mod_perl, then inside your IfDefine block, do a 
PerlSetEnv (or maybe a PerlSetVar), eg:


PerlSetEnv SERVER_MODE "test"

And then just check for key %ENV to see if the -D flag was 
applicable for that request.


The same technique should work with fast_cgi but you'll need to 
use SetEnv rather than PerlSetEnv (unless fast_cgi has 
PerlSetEnv equivalent).


Charlie

--
   Charlie Garrison  
   PO Box 141, Windsor, NSW 2756, Australia

O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
http://www.ietf.org/rfc/rfc1855.txt

___
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] Re: New Catalyst Book?

2009-04-15 Thread Ali M.
Any updates on this book, i have a coupon that expires before June
Hope you publish it ahead of schedule! :)

___
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] Re: New Catalyst Book?

2009-04-15 Thread Kieren Diment


On 15/04/2009, at 10:34 PM, Ali M. wrote:


Any updates on this book, i have a coupon that expires before June
Hope you publish it ahead of schedule! :)


Reviewing chapter 3 at the moment before it goes to copy edit.  I  
think we're going to publish on time ...


___
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] Apache's

2009-04-15 Thread Ben Vinnerd

Hi,

I pass a flag to Apache when i start it up, e.g. -Dhello. Any ideas how 
i can check this from within a Catalyst app?


Thanks,

Ben


___
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] [Announce] Catalyzed.org launched

2009-04-15 Thread Ali M.
I like the site name, you caught a nice domain name here?

The trick would be to keep it alive, we already have Perlbuzz  which
is quiet nice (and sounds very nice too)
and Planet Perl!

Good luck! :)

___
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] Authentication methods question

2009-04-15 Thread Emmanuel Quevillon
J. Shirley wrote:
> On Wed, Apr 15, 2009 at 7:40 PM, Iain  > wrote:
> 
> On Wed, 2009-04-15 at 12:35 +0200, Emmanuel Quevillon wrote:
> > Hi there,
> >
> > I just wondered, if it would be possible, via a login page
> > and Catalyst::Authentication to configure more than one way
> > to identify a user?
> > My idea would be to let the user authenticate through its OpenID
> > account, if (s)he has one, or then, by default using an user account
> > stored in a database.
> > If someone has already done it, clue welcome.
> >
> > Thanks in advance
> 
> Haven't used it myself but
> 
> Catalyst::Authentication::Realm::Progressive - http://bit.ly/3beuPm
> 
> sounds like it will do the trick.
> 
> Iain.
> 
> 
> As the person to blame for that realm, yes, that is what it is for.  It
> is exactly for that purpose, and I wrote up an advent article with the
> specific idea of linking OpenID to a traditional account.
> 
> You can view it at http://www.catalystframework.org/calendar/2008/19
> 
> Good luck.
> 
> -J
> 
> 
> 
> 
> ___
> 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/

Thanks guys! :)

-- 
-
Emmanuel Quevillon
Biological Software and Databases Group
Institut Pasteur
+33 1 44 38 95 98
tuco at_ pasteur dot fr
-

___
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] Tutorial for cache?

2009-04-15 Thread Oliver Charles
On Wed, Apr 15, 2009 at 7:25 AM, Alexander Tamm  wrote:
> Thanks, but I should have specified that I want to cache values in the
> application itself. I already have an implementation for controlling the
> browsers cache.

This is less of a Catalyst question then I guess? You could make use
of caching in your back end models (which are independent of Catalyst,
right!?) with the Cache:: modules, and if you need some Catalyst
integration, then you could use Catalyst::Plugin::Cache.

-- 
Oliver Charles / aCiD2

___
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] Authentication methods question

2009-04-15 Thread J. Shirley
On Wed, Apr 15, 2009 at 7:40 PM, Iain  wrote:

> On Wed, 2009-04-15 at 12:35 +0200, Emmanuel Quevillon wrote:
> > Hi there,
> >
> > I just wondered, if it would be possible, via a login page
> > and Catalyst::Authentication to configure more than one way
> > to identify a user?
> > My idea would be to let the user authenticate through its OpenID
> > account, if (s)he has one, or then, by default using an user account
> > stored in a database.
> > If someone has already done it, clue welcome.
> >
> > Thanks in advance
>
> Haven't used it myself but
>
> Catalyst::Authentication::Realm::Progressive - http://bit.ly/3beuPm
>
> sounds like it will do the trick.
>
> Iain.
>
>
As the person to blame for that realm, yes, that is what it is for.  It is
exactly for that purpose, and I wrote up an advent article with the specific
idea of linking OpenID to a traditional account.

You can view it at http://www.catalystframework.org/calendar/2008/19

Good luck.

-J
___
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] Web parts

2009-04-15 Thread J. Shirley
On Wed, Apr 15, 2009 at 7:41 PM, Kyoko Shikamata
wrote:

> Hi,
>
> How do you design web parts ?
>
> I'm using C::P::SubRequest in my project.
>
> Ex:
> 
> 
>  
>   Hello
>  
>  
>[% c.subreq('/parts/ranking') %]
>  
> 
> 
>
> package MyApp::Controller::Parts::Ranking;
> ..
> sub index : Local {
>my ( $self, $c ) = @_;
>$c->stash->{data} =
> $c->model('Products')
> ->search({},
>  {order_by => 'sales DESC' });
>$c->stash->{template} = 'parts/ranking.tt';
>$c->forward($c->view('TT'));
> }
> 1;
>
> But,
> When I use C::P::PageCache, C::P::SubRequest sometimes is not executed.
> I cannot find the cause.
> So, I'm looking for other methods.
> Pls teach me the good design.
>
>
> I apologize for my poor English.
> ---
> Kyoko Shikamata
>
>
Why are you using a subrequest, rather than forwarding to the controller and
allowing that to populate the stash?  Unless you have a reason for the
subrequest, it is usually better to simply generate all data in the stash,
and have the template render out the data.  So your main controller would
simply do $c->forward('/parts/ranking') and include the template for
processing ([% PROCESS "parts/ranking.tt" %])

SubRequest makes an entirely new request inside, blocking the calling
request until the other is done.  If you want this type of design you
probably should be using Catalyst::View::Component::SubInclude as a
framework, rather than doing it on your own.  The benefits of this are when
you launch, you can use something that supports ESI and cache the entire
page but only call the individual subcomponents.

I do think that your design may be overly complex, but without knowing more
details I cannot help any further.

(I notice you have a .jp email address, so I'll mention that I'll be giving
a Catalyst talk in Akihabara on April 21st, by the way.
http://japan.perlassociation.org/event/jpa-seminar-01 -- the JPA is
translating my slides)

-J
___
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] Authentication methods question

2009-04-15 Thread Iain
On Wed, 2009-04-15 at 12:35 +0200, Emmanuel Quevillon wrote:
> Hi there,
> 
> I just wondered, if it would be possible, via a login page
> and Catalyst::Authentication to configure more than one way
> to identify a user?
> My idea would be to let the user authenticate through its OpenID
> account, if (s)he has one, or then, by default using an user account
> stored in a database.
> If someone has already done it, clue welcome.
> 
> Thanks in advance

Haven't used it myself but 

Catalyst::Authentication::Realm::Progressive - http://bit.ly/3beuPm

sounds like it will do the trick.

Iain.


___
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] Web parts

2009-04-15 Thread Kyoko Shikamata
Hi,

How do you design web parts ?

I'm using C::P::SubRequest in my project.

Ex:


  
   Hello
  
  
[% c.subreq('/parts/ranking') %]
  



package MyApp::Controller::Parts::Ranking;
..
sub index : Local {
my ( $self, $c ) = @_;
$c->stash->{data} = 
 $c->model('Products')
 ->search({},
  {order_by => 'sales DESC' });
$c->stash->{template} = 'parts/ranking.tt';
$c->forward($c->view('TT'));
}
1;

But, 
When I use C::P::PageCache, C::P::SubRequest sometimes is not executed.
I cannot find the cause.
So, I'm looking for other methods.
Pls teach me the good design.


I apologize for my poor English.
---
Kyoko Shikamata



___
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] Authentication methods question

2009-04-15 Thread Emmanuel Quevillon
Hi there,

I just wondered, if it would be possible, via a login page
and Catalyst::Authentication to configure more than one way
to identify a user?
My idea would be to let the user authenticate through its OpenID
account, if (s)he has one, or then, by default using an user account
stored in a database.
If someone has already done it, clue welcome.

Thanks in advance
-- 
-
Emmanuel Quevillon
Biological Software and Databases Group
Institut Pasteur
+33 1 44 38 95 98
tuco at_ pasteur dot fr
-

___
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] [Announce] Catalyzed.org launched

2009-04-15 Thread Jason Kuri

Hi All,

I just wanted to take a moment to announce that Catalyzed.org ( 
http://www.catalyzed.org
 ) officially launched today.

Catalyzed.org is a site dedicated to Modern Perl and Catalyst
development.  We created it to cover all the exciting things that are
going on in the world of Perl, and to cover the interesting things
people are doing with Catalyst (and how to repeat some of them.)

Special thanks to Devin Austin, Dan Dascalescu and Andrew Rodland for
all the help they provided getting this rolling!

Ideas for new articles are posted on http://catalyzed.ideascale.com/
I encourage everyone to post their own ideas for articles and to vote
on the ones that are there.

Jay Kuri

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