Re: [Catalyst] $c->uri_for and $c->uri_for_action ignoring https

2021-10-02 Thread Robert Brown

My first thought is...

https://metacpan.org/pod/Catalyst#PROXY-SUPPORT


On 02/10/2021 14:35, Chris Welch wrote:

Hi everyone

In my infinite(!) wisdom, I decided to do a complete server rebuild 
before people will start using my website again next month. This 
previously was working correctly, however now even though the page is 
being served over https, all the links (which use $c->uri_for and 
$c->uri_for_action) are returning http versions, which is causing the 
style sheets to fail to load for one thing, but also form submissions 
are going over http.


Some things that may be pertinent:

  * Using nginx / Starman (same as before).
  * This is using a letsencrypt certificate, which it was before, but
when I set it up before there wasn't a certbot to automate it, so
it was done manually.
  * Website in case it's useful: https://www.mkttl.co.uk/

  * Catalyst version is now the latest - previously I *think* it
was 5.90118, but unfortunately can't be sure.

Thank you in advance for any suggestions!


Chris

___
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] stash alternative for passing data

2017-05-11 Thread Robert Brown

You can configure Catalyst::View::JSON to NOT work on the entire stash.

See 'expose_stash' in the config: 
https://metacpan.org/pod/Catalyst::View::JSON




On 11/05/17 20:29, Rajesh Kumar Mallah wrote:


Hi

We need to pass value of variables from one stage of request
processing to other. We can use stash , but the problem is
some views like  Catalyst::View::JSON   tend to work on the
entire stash and they convert the stash to JSON output and we
do not want to expose all the intermediate values/variables.


Hence my question is  is there any mechanism to share data
in Catalyst App other than the stash.

Or should i create a simple perl package and use a global
hash variable in it ?

regds
mallah.






___
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] Getting DBIC schema from outside Catalyst?

2017-03-08 Thread Robert Brown

Hi Jen,

You can use MyApp::Schema outside of Catalyst:

my $schema = MyApp::Schema->connect( $ENV{ LIVE } ? 'live' : 'dev' );

(I'm additionally using DBIx::Class::Schema::Config to be able to 
connect to different servers by using different config files)


$schema->resultset('Instance')->search_rs(), etc.

Hope this helps,

Rob




On 08/03/17 21:06, Dr. Jennifer Nussbaum wrote:

Hi, I hope Im asking this correctly.

I have a full-blown Catalyst application that connects to many DBIC schemas 
with information
stored in the conf file, as per usual C::M::DBIC::Schema practices, and I 
access them with
again the usual practices, $c->model('Foo')->search() etc.

I need to get these schemas from outside the Cat application, e.g. to run cron 
scripts, etc.
I was going to write a utility method to parse the config file, connect to the 
database, etc.,
but I was wondering that if C::M::DBIC::Schema already does this, is there a 
way I can access
this from _outside_ of my Catalyst app, i.e. something I can call to return 
this from a script?

Thanks.

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/



___
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] Detect client disconnection

2016-03-11 Thread Robert Brown

Hi,

I stream data from mysql via my app, which is usually gigabytes-worth.

Using "mysql_use_result" to stream the data immediately when it's available.

Is there a mechanism in Catalyst to catch a disconnection by the client?

Otherwise the command on mysql is left running to completion.

(I feel like I've asked/fixed this issue before, but can't find any 
trace of it).


Thanks,
Rob


___
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 psgi behind 2 apache reverse proxies

2015-07-08 Thread Robert Brown

Do you have...

__PACKAGE__-config(
using_frontend_proxy = 1,
);

?


On 07/08/2015 03:46 PM, Bernhard Bauch wrote:

dear all,

another deployment question :)
suroundings: catalyst, psgi, starman, apache2.
but in our setup there are *two* apache2s doing reverse proxies before 
the requests reaches the starman server.


so what happend:

the http headers look like this (for catalyst)
X-FORWARDED-FOR: clients-ip, proxy2-ip
REQUEST_IP_ADDRESS: proxy2-ip

what Plack::Middleware::ReverseProxy does it puts the LAST ip in the 
forwarded-for header into

$env-{REMOTE_ADDR}
which is actually not the IP of the client.
why is that happening ?
shouldn't it take the first IP, so catalyst has access to the original 
requests IP ?


my apache proxy configs look like this...
is there something wrong with the proxies config  ?

thanks for hints!
cheers, bernhard





proxy 1 (connectivity from outside)-

VirtualHost *:80

ServerName publicdomain.com http://publicdomain.com

ProxyRequests Off
Proxy *
Order deny,allow
Allow from all
/Proxy
ProxyPass   / http://10.0.200.8:80/
ProxyPassReverse/ http://10.0.200.8:80/
ProxyPreserveHost   On
/VirtualHost


proxy 2 (connectivity from inside)


VirtualHost *:80
ServerName publicdomain.com http://publicdomain.com

# don't loose time with IP address lookups
HostnameLookups Off
# helpful for named virtual hosts
UseCanonicalName Off

# ---
# HANDLE STATIC FILES
# ---
Alias   /static /usr/local/MyApp/root/static
Location /static
  SetHandler default-handler
  # allow access (thats new in apache 2.4. see 
http://httpd.apache.org/docs/2.4/upgrading.html#access)

  Require all granted
/Location
ProxyPass   /static/!

# ---
# DYNAMIC REQUESTS (starman)
# ---
RewriteEngine On
ProxyPreserveHost On

ProxyPass   / http://localhost:5000/
ProxyPassReverse/ http://localhost:5000/
/VirtualHost





---
Bernhard Bauch
Webdevelopment

ZSI-Zentrum für Soziale Innovation GmbH
Centre for Social Innovation

Linke Wienzeile 246, A-1150 Wien, Austria
Mail: ba...@zsi.at mailto:ba...@zsi.at
Skype: berni-zsi






___
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] Rackspace Ubuntu 14.04

2015-05-13 Thread Robert Brown

As an FYI,

Since I'm on a new project anyway, we've been able to pick up the latest 
version of Perl, and a snapshot of those libs and run with it.


Our main product has been going 3 years, with no issues.

Easy to try out a new Perl and/or modules





On 13/05/15 21:58, James Leu wrote:

Just to add to Robert's idea.

We use perlbrew and Carton for our catalyst environments
We deploy via RPMs, but each RPM contains a perlprew environment
and a local lib dir managed by Carton.

On Wed, May 13, 2015 at 06:26:40PM +0100, Robert Brown wrote:

Not to answer your actual question, but...

Have you also thought using Perlbrew http://perlbrew.pl

As regular user, you can install any version of Perl locally (to
your home dir), plus all the modules via cpanm, and keep
everything self-contained for a particular user.

It's made our deployments a breeze, rather than dealing with the
system-wide perl, etc.

(There's also local::lib tho I've not delved into that myself).

Hope it helps a little.

Rob


On 13/05/15 18:16, Duncan Garland wrote:

Hi,

I've just spun up a Rackspace server with Ubuntu 14.04 and
tried to install Catalyst from CPAN.

If the print out means what it seems to mean, then Catalyst
will no longer install cleanly from CPAN on any version prior
to 5.20.

It's saying that there is a dependency on Tie::StdHash and
that Tie::StdHash won't install without force because the
latest version of the module is part of perl-5.20.2.

It won't effect me because I'll just force it or download an
older version of the module.

All the same, it seems a bit poor.

Is it deliberate?

Regards

Duncan



The information contained in this message is for the intended
addressee only and may contain confidential and/or privileged
information. If you are not the intended addressee, please
delete this message and notify the sender; do not copy or
distribute this message or disclose its contents to anyone.
Any views or opinions expressed in this message are those of
the author and do not necessarily represent those of
Motortrak Limited or of any of its associated companies. No
reliance may be placed on this message without written
confirmation from an authorised representative of the
company.

Registered in England 3098391 V.A.T. Registered No. 667463890


___
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] Rackspace Ubuntu 14.04

2015-05-13 Thread Robert Brown

One of my previous employers deployed with RPMs.

And I never understood why.

It's a good question for the community here, what's your deployment 
strategy, and why is it so?


What would you change if you're not the decision -maker.




On 13/05/15 21:58, James Leu wrote:

Just to add to Robert's idea.

We use perlbrew and Carton for our catalyst environments
We deploy via RPMs, but each RPM contains a perlprew environment
and a local lib dir managed by Carton.

On Wed, May 13, 2015 at 06:26:40PM +0100, Robert Brown wrote:

Not to answer your actual question, but...

Have you also thought using Perlbrew http://perlbrew.pl

As regular user, you can install any version of Perl locally (to
your home dir), plus all the modules via cpanm, and keep
everything self-contained for a particular user.

It's made our deployments a breeze, rather than dealing with the
system-wide perl, etc.

(There's also local::lib tho I've not delved into that myself).

Hope it helps a little.

Rob


On 13/05/15 18:16, Duncan Garland wrote:

Hi,

I've just spun up a Rackspace server with Ubuntu 14.04 and
tried to install Catalyst from CPAN.

If the print out means what it seems to mean, then Catalyst
will no longer install cleanly from CPAN on any version prior
to 5.20.

It's saying that there is a dependency on Tie::StdHash and
that Tie::StdHash won't install without force because the
latest version of the module is part of perl-5.20.2.

It won't effect me because I'll just force it or download an
older version of the module.

All the same, it seems a bit poor.

Is it deliberate?

Regards

Duncan



The information contained in this message is for the intended
addressee only and may contain confidential and/or privileged
information. If you are not the intended addressee, please
delete this message and notify the sender; do not copy or
distribute this message or disclose its contents to anyone.
Any views or opinions expressed in this message are those of
the author and do not necessarily represent those of
Motortrak Limited or of any of its associated companies. No
reliance may be placed on this message without written
confirmation from an authorised representative of the
company.

Registered in England 3098391 V.A.T. Registered No. 667463890


___
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] Rackspace Ubuntu 14.04

2015-05-13 Thread Robert Brown
Maybe I'm benefiting from a platform of only 40 servers, tho I'm not 
sure what our limits would be.


For us they're simple (virtual) web servers.

If one plays up, drop it, rebuild, and away we go, I kinda got that from 
Yahoo!  Don't worry about what went wrong, just rebuild and carry on.


This is all a brand new (2 years old) Catalyst env, so yes, I've had 
some benefits.


Our ~/perl5 is in svn too, so live and dev boxes should always carry the 
same code.


Would you deploy anything without ensuring the perl5 is also fully 
up-to-date first?  That's our first check with our own deployment script?


We're only a team of 3, so all dev's are also dev-ops so to speak.






On 13/05/15 22:26, James Leu wrote:

Excellent idea Robert.  I've been doing it this way
for so long, it would be nice to take fresh view at
how others are doing it.


For us RPM add two benifits:
- It allows us to validate that files have not changed from
the originial reployed version.

- I can give our Ops team a RPM and have them schedule/handle
deployment

I can see doing something similar in a docker environment
but I have had not had time to vett that idea.

On Wed, May 13, 2015 at 10:08:17PM +0100, Robert Brown wrote:

One of my previous employers deployed with RPMs.

And I never understood why.

It's a good question for the community here, what's your
deployment strategy, and why is it so?

What would you change if you're not the decision -maker.




On 13/05/15 21:58, James Leu wrote:

Just to add to Robert's idea.

We use perlbrew and Carton for our catalyst environments
We deploy via RPMs, but each RPM contains a perlprew environment
and a local lib dir managed by Carton.

On Wed, May 13, 2015 at 06:26:40PM +0100, Robert Brown wrote:

Not to answer your actual question, but...

Have you also thought using Perlbrew http://perlbrew.pl

As regular user, you can install any version of Perl locally (to
your home dir), plus all the modules via cpanm, and keep
everything self-contained for a particular user.

It's made our deployments a breeze, rather than dealing with the
system-wide perl, etc.

(There's also local::lib tho I've not delved into that myself).

Hope it helps a little.

Rob


On 13/05/15 18:16, Duncan Garland wrote:

Hi,

I've just spun up a Rackspace server with Ubuntu 14.04 and
tried to install Catalyst from CPAN.

If the print out means what it seems to mean, then Catalyst
will no longer install cleanly from CPAN on any version prior
to 5.20.

It's saying that there is a dependency on Tie::StdHash and
that Tie::StdHash won't install without force because the
latest version of the module is part of perl-5.20.2.

It won't effect me because I'll just force it or download an
older version of the module.

All the same, it seems a bit poor.

Is it deliberate?

Regards

Duncan



The information contained in this message is for the intended
addressee only and may contain confidential and/or privileged
information. If you are not the intended addressee, please
delete this message and notify the sender; do not copy or
distribute this message or disclose its contents to anyone.
Any views or opinions expressed in this message are those of
the author and do not necessarily represent those of
Motortrak Limited or of any of its associated companies. No
reliance may be placed on this message without written
confirmation from an authorised representative of the
company.

Registered in England 3098391 V.A.T. Registered No. 667463890


___
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] Rackspace Ubuntu 14.04

2015-05-13 Thread Robert Brown

Not to answer your actual question, but...

Have you also thought using Perlbrew http://perlbrew.pl

As regular user, you can install any version of Perl locally (to your 
home dir), plus all the modules via cpanm, and keep everything 
self-contained for a particular user.


It's made our deployments a breeze, rather than dealing with the 
system-wide perl, etc.


(There's also local::lib tho I've not delved into that myself).

Hope it helps a little.

Rob


On 13/05/15 18:16, Duncan Garland wrote:

Hi,

I've just spun up a Rackspace server with Ubuntu 14.04 and tried to 
install Catalyst from CPAN.


If the print out means what it seems to mean, then Catalyst will no 
longer install cleanly from CPAN on any version prior to 5.20.


It's saying that there is a dependency on Tie::StdHash and that 
Tie::StdHash won't install without force because the latest version of 
the module is part of perl-5.20.2.


It won't effect me because I'll just force it or download an older 
version of the module.


All the same, it seems a bit poor.

Is it deliberate?

Regards

Duncan



The information contained in this message is for the intended 
addressee only and may contain confidential and/or privileged 
information. If you are not the intended addressee, please delete this 
message and notify the sender; do not copy or distribute this message 
or disclose its contents to anyone. Any views or opinions expressed in 
this message are those of the author and do not necessarily represent 
those of Motortrak Limited or of any of its associated companies. No 
reliance may be placed on this message without written confirmation 
from an authorised representative of the company.


Registered in England 3098391 V.A.T. Registered No. 667463890


___
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] Rackspace Ubuntu 14.04

2015-05-13 Thread Robert Brown
Interesting, we don't use local::lib, just perlbrew, both dev and 
production, and keep the whole perlbrew dir in svn, works great.


Will let the catalyst devs answer the actual/original question...


On 13/05/15 19:01, Duncan Garland wrote:

Hi,

We don't use perlbrew on production, but I've used it in other areas 
without a problem. As far as I know it's very highly regarded.


I've used local::lib successfully for development work ie Temporarily 
pointing to some different modules.


I spent quite a lot of time at the beginning of this year trying to 
set it up so that we could use it seriously. I wanted to be able to do 
a twice yearly update from CPAN of all our modules into a seperate 
directory structure so that it would be easy to revert if the updated 
tree turned out to contain a bug.


local::lib plays nicely with cpan but not with cpanplus. The default 
way for a Catalyst app to maintain it's dependencies is to maintain 
Makefile.PL. When you run that it uses cpanplus. I struggled with it 
for quite a while and gave up.


All the best.

On Wed, May 13, 2015 at 6:26 PM, Robert Brown r...@intelcompute.com 
mailto:r...@intelcompute.com wrote:


Not to answer your actual question, but...

Have you also thought using Perlbrew http://perlbrew.pl

As regular user, you can install any version of Perl locally (to
your home dir), plus all the modules via cpanm, and keep
everything self-contained for a particular user.

It's made our deployments a breeze, rather than dealing with the
system-wide perl, etc.

(There's also local::lib tho I've not delved into that myself).

Hope it helps a little.

Rob


On 13/05/15 18:16, Duncan Garland wrote:

Hi,

I've just spun up a Rackspace server with Ubuntu 14.04 and tried
to install Catalyst from CPAN.

If the print out means what it seems to mean, then Catalyst will
no longer install cleanly from CPAN on any version prior to 5.20.

It's saying that there is a dependency on Tie::StdHash and that
Tie::StdHash won't install without force because the latest
version of the module is part of perl-5.20.2.

It won't effect me because I'll just force it or download an
older version of the module.

All the same, it seems a bit poor.

Is it deliberate?

Regards

Duncan



The information contained in this message is for the intended
addressee only and may contain confidential and/or privileged
information. If you are not the intended addressee, please delete
this message and notify the sender; do not copy or distribute
this message or disclose its contents to anyone. Any views or
opinions expressed in this message are those of the author and do
not necessarily represent those of Motortrak Limited or of any of
its associated companies. No reliance may be placed on this
message without written confirmation from an authorised
representative of the company.

Registered in England 3098391 V.A.T. Registered No. 667463890


___
List:Catalyst@lists.scsys.co.uk  mailto: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 mailto: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/



The information contained in this message is for the intended 
addressee only and may contain confidential and/or privileged 
information. If you are not the intended addressee, please delete this 
message and notify the sender; do not copy or distribute this message 
or disclose its contents to anyone. Any views or opinions expressed in 
this message are those of the author and do not necessarily represent 
those of Motortrak Limited or of any of its associated companies. No 
reliance may be placed on this message without written confirmation 
from an authorised representative of the company.


Registered in England 3098391 V.A.T. Registered No. 667463890


___
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] Advent Calendar... Grant proposal...

2015-01-18 Thread Robert Brown
I'm rather concerned with that statement, but will allow time for all of 
us to sober up.




On 03/01/15 22:44, Lance A. Brown wrote:

Robert Brown wrote on 1/3/2015 5:36 PM:

Is this something we can resolve, or simply make better as its install
process, that maybe needs explaining better?

I don't think it can be resolved unless Catalyst wants to move in the
same direction Mojolicious has taken, which I don't agree with.

I hesitate to call it a warning, but some kind of note in the
documentation and or at the beginning of the Catalyst install process to
let the user know it will take some time would be useful.

--[Lance]




___
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] Advent Calendar... Grant proposal...

2015-01-18 Thread Robert Brown
My greatest concern is only that we keep this accessible, no strings, no 
branches, etc.


how can we best do this?




On 03/01/15 22:44, Lance A. Brown wrote:

Robert Brown wrote on 1/3/2015 5:36 PM:

Is this something we can resolve, or simply make better as its install
process, that maybe needs explaining better?

I don't think it can be resolved unless Catalyst wants to move in the
same direction Mojolicious has taken, which I don't agree with.

I hesitate to call it a warning, but some kind of note in the
documentation and or at the beginning of the Catalyst install process to
let the user know it will take some time would be useful.

--[Lance]




___
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] Advent Calendar... Grant proposal...

2015-01-03 Thread Robert Brown
I find that getting involved in a project like Catalyst is much like 
releasing your own CPAN module - possibly daunting at first, hence some 
reluctance?


From my own experience only, it took years to finally find something I 
was comfortable to release, but when I did, it then starts to flow.


To me, it's all about that initial involvement... that first step, and 
making it as painless as possible.


Maybe I've been skipping things recently, do we have a roadmap?  A 
simple list of issues, bugs, and feature-requests?  Something 
Trello-esque maybe?

and as small as possible?

Do we have a documented workflow?  Perhaps even down to copy  paste 
commands to cut a branch, etc.


I'd personally love to pick up a simple documentation fix to get 
involved.  More to get a feel of actually contributing back to the 
codebase, as simple as that sounds, I feel it may be a huge stumbling 
block for most.


If we make simpler, we may have more success?

Just some random 2-cents...



On 03/01/15 20:08, Octavian Rasnita wrote:

From:
http://www.catalystframework.org/calendar/2014/21

I've also considered making a request for a grant from the Perl 
Foundation in order to work on these docs, and wonder what you all 
think of that :)



I think that one of the main use of Perl is to create web apps.
And the best way of creating web apps is by using a web framework.
And the most developed web framework for Perl is Catalyst.
But those who prefer other frameworks do it because they consider 
Catalyst too complex and hard to understand.

So yes, a more clear documentation for Catalyst should be very helpful.
Newbies might have the time and willing to write it, but they might 
not know what to write. :)

So... applying for a grant to do it may be the solution.


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



___
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] Advent Calendar... Grant proposal...

2015-01-03 Thread Robert Brown
Is this something we can resolve, or simply make better as its install 
process, that maybe needs explaining better?




On 03/01/15 22:26, Lance A. Brown wrote:

Kieren Diment wrote on 1/3/2015 3:43 PM:

3.  Catalyst used to be hard to install (and catalyst had a lot of
influence on improving the cpan toolchain during the relatively early
days), but this isn't the case any more, but the perception lingers in
places.

Catalyst isn't nearly as difficult to install these days, but it still
feels like you're installing most of CPAN in order to get Catalyst.  And
it still takes a frickin' long time.

--[Lance]




___
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] Monitoring Catalyst on Apache2 FastCGI

2014-05-05 Thread Robert Brown
Are you using https://metacpan.org/pod/Catalyst::Log for your own 
application-level logging?


This would be step one.

For performance testing, memory leaks, etc. I'm sure there's plenty of 
options on CPAN?




On 05/05/2014 11:41 AM, Bernhard Bauch wrote:

Dear all,

I'd need some help with debugging and monitoring an apache2+fastcgi
production environment ...
... i did not find any information about that online ?! :(

what i would need is logs of the fcgi processes that show:
* the request IP, url and paramters
* how long it took to answer a request
* cpu+mem usage of each process

putting a catalyst application into Debug-mode is one option;
but thats not clever for a production environment ... and its pretty
hard to scan through all that information.

any ideas ?


the story behind

We are running a bunch of Catalyst applications in an Apache2 and
FastCGI production environemnt.
Since a few days it happend 2 times, that one of these applications ran
really hot;
the fcgi processes of that application used 4times more ram and constant
high CPU-usage.
the result was, that apache spanned lots of processes trying to answer
all requests;

so at the end *all* requests to apache2 returned a timeout ..

i tried to find out what the problem was; grubbed through lots of apache
access logs without any reasonable result :(

i'd be thankful for any hints how a catalyst+apache+fastcgi environment
can be monitored ..

thanks alot,
bernhard




___
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] Inconsistency when retrieving objects from stash

2014-04-25 Thread Robert Brown

Hi Dave,

From what I understand, there is nothing magical about the stash, 
it's basically a hash reference, used once per request, that is all.


So, I would suggest you look at debugging more the objects you're 
storing in the stash, and how they may change during the request cycle.


You would need to supply more code samples/examples.

If you can, start stripping away what's not necessary and still be able 
to re-produce the problem, it will most probably highlight the issue by 
itself.


Otherwise, reply back with a full working example.

Ideally use something like http://paste.scsys.co.uk to paste your code 
snippets, post as much as you can, it's usually the subtle bits you 
don't think are important where the actual issue lies.



Rob


On 04/25/2014 08:08 PM, David Trudgian wrote:

Hi,

I'm observing a frustrating problem where the following happens:

A Catalyst controller retrieves a 'search' object and the related parent 
'submission' object from a DBIC schema instance. It puts them into the stash:

   $c-model('CPFP')-schema-resultset('Searches')-find($sch_id);
   $c-stash-{search} = $search;
   $c-stash-{submission} = $search-submission;

Now, the relationships here mean it's always the case that 
$search-submission-sub_id = $submission-sub_id

However, when forwarded to the view (TT2 HTML or Excel Template Plus based), 
occasionally the search and submission pulled back out of the stash in the 
template are inconsistent. The following trap in the template will throw an 
error:

[% IF search.submission.sub_id != submission.sub_id %]
   [% THROW mismatch Fatal Error SCH-SUB-ID != SUB-ID %]
[% END %]

I don't understand how this is possible, given the way the stash values are set 
in the controller. It occurs infrequently, and I can't find a situation that 
reproducibly causes it. The app is running under fastcgi on Apache.

Any thoughts on what to look at would be much appreciated. I was considering 
session crossover as a cause, so ensured there was entropy on the server, set 
no-cache headers for proxies etc. However, I have now seen this occur on a 
development machine with only me connected to the app. I don't understand well 
enough how the stash works in order to know what might affect the consistency 
like this.

Any help greatly appreciated!

Dave Trudgian





UT Southwestern Medical Center
The future of medicine, today.


___
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] Inconsistency when retrieving objects from stash

2014-04-25 Thread Robert Brown
Yeah these random problems are always the worst, you find it 
impossible to re-create, which usually just means the issue isn't where 
you think it is, because if it was, you'd be able to re-create it easily.


Been there a million times before myself, and it's usually something 
simple and obvious, when you find it.





On 04/25/2014 08:41 PM, David Trudgian wrote:

Hi Rob,

Thanks for the input. Yeah, I need to dedicate a bunch of time to looking at 
this and paring it down to find where the problem occurs. The major headache 
there is that I use this system heavily every day, and I might see the issue a 
couple of times a month. I just haven't been able to reproduce it, despite 
trying to replicate the usage when I have observed it.

If the stash is just a request specific hashref then I must have 
reassignment/modification of one of the objects somewhere.

Thanks,

DT



-Original Message-
From: Robert Brown [mailto:r...@intelcompute.com]
Sent: Friday, April 25, 2014 2:18 PM
To: catalyst@lists.scsys.co.uk
Subject: Re: [Catalyst] Inconsistency when retrieving objects from stash

Hi Dave,

  From what I understand, there is nothing magical about the stash, it's 
basically a hash reference, used once per request, that is all.

So, I would suggest you look at debugging more the objects you're storing in 
the stash, and how they may change during the request cycle.

You would need to supply more code samples/examples.

If you can, start stripping away what's not necessary and still be able to 
re-produce the problem, it will most probably highlight the issue by itself.

Otherwise, reply back with a full working example.

Ideally use something like http://paste.scsys.co.uk to paste your code 
snippets, post as much as you can, it's usually the subtle bits you don't think 
are important where the actual issue lies.


Rob


On 04/25/2014 08:08 PM, David Trudgian wrote:

Hi,

I'm observing a frustrating problem where the following happens:

A Catalyst controller retrieves a 'search' object and the related parent 
'submission' object from a DBIC schema instance. It puts them into the stash:

$c-model('CPFP')-schema-resultset('Searches')-find($sch_id);
$c-stash-{search} = $search;
$c-stash-{submission} = $search-submission;

Now, the relationships here mean it's always the case that
$search-submission-sub_id = $submission-sub_id

However, when forwarded to the view (TT2 HTML or Excel Template Plus based), 
occasionally the search and submission pulled back out of the stash in the 
template are inconsistent. The following trap in the template will throw an 
error:

[% IF search.submission.sub_id != submission.sub_id %]
[% THROW mismatch Fatal Error SCH-SUB-ID != SUB-ID %] [% END %]

I don't understand how this is possible, given the way the stash values are set 
in the controller. It occurs infrequently, and I can't find a situation that 
reproducibly causes it. The app is running under fastcgi on Apache.

Any thoughts on what to look at would be much appreciated. I was considering 
session crossover as a cause, so ensured there was entropy on the server, set 
no-cache headers for proxies etc. However, I have now seen this occur on a 
development machine with only me connected to the app. I don't understand well 
enough how the stash works in order to know what might affect the consistency 
like this.

Any help greatly appreciated!

Dave Trudgian





UT Southwestern Medical Center
The future of medicine, today.


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


___
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] Working a Solr Model

2013-09-29 Thread Robert Brown
I've always rolled my own for due to the reasons you mention with what's 
on CPAN, tho I last did this more than 2 years ago, so even my examples 
need cleaning up and re-factoring again  :-/




On 09/29/2013 08:54 AM, John Karr wrote:
I'm commencing a project that is going to use Solr because it will be 
search intensive.


My research hasn't turned up a lot in terms of discussion and how tos 
for either Solr and Perl or Solr and Catalyst. There are two CPAN 
modules which I've been experimenting with, WebService::Solr and 
Apache::Solr.
WebService::Solr only implements the LWP agent part of working with 
Solr, which still leaves one to extract the actual JSON what LWP gives 
you, plus it has fatal wide-character issues that use utf8::all 
isn't able to fix, and also does not support xml and csv (other 
formats solr can provide). Apache::Solr is much nicer in that it 
provides something resumbling a dbic result set, but I've already 
encountered a few things that seem like bugs and sending the 
resultsetlike object to the stash in the same way as a dbic resultset 
doesn't seem to work the same way.


Are other people using Solr based models? if so are you using either 
of the two CPAN modules or something else? Do you have examples and or 
notes you can share?


___
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] Newbie questions regarding nginx/fastcgi configuration

2012-12-16 Thread Robert Brown
Here's a basic run script I use for my projects, think I got it from the 
Catalyst wiki pages somwehere...


http://paste.scsys.co.uk/219142



On 12/16/2012 10:21 PM, Kieren Diment wrote:



On 17/12/2012, at 9:09 AM, Victor Cassen wrote:


Hi,

I am trying to deploy my first Catalyst application using nginx, and I am
confused by various sources of documentation as to whether or not I'm
required to run a separate fastcgi wrapper, or whether script/
myapp_fastcgi.pl *is* my wrapper.  If I do need a separate wrapper, is
there one that is preferred?



The *fastcgi.pl is your wrapper.

The source of your confusion is that you probably want a way to stop and start 
it cleanly.  I've heard people like daemontools for that, although the wrong 
and filthy way to do it is to run the fastcgi script in a screen session.


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


--
IntelCompute
Web Design  Online Marketing Experts

http://www.intelcompute.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/