[Catalyst] Wiki down

2012-03-06 Thread Tobias Kremer
Just a heads up: The Catalyst wiki is down since at least yesterday.
Does nobody monitor these things? Compared to other frameworks, the
whole site looks horrible enough, we should at least try to keep it
working. Links to MetaCPAN instead of plain old CPAN would be nice as
well. Is there a public repo for the site?

Thanx!

--Toby

___
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] Requests get rendered twice.. TT-Template (View::HTML-process)

2012-03-06 Thread Martin Gillmaier

Hello to All!

First, I am a perl-programmer and I am about to accomplish my first 
catalyst-project.

Catalyst is really nice and flexible, and I am happy to get used to it.
However, I kindly like you ask you about an issue, that I just can't 
understand and that is driving me mad:


I view the debug output in the terminal/bash:
/*$ script/expert_server.pl -r*
/
And each time I do a request to the browser, I see an output like this 
in my bash:

/
*[info] *** Request 14 (0.560/s) [1678] [Tue Mar  6 15:12:59 2012] ***
[debug] Found sessionid 6f332e165af682b03622e1b74318d5a646e69a22 in cookie
[debug] Restored session 6f332e165af682b03622e1b74318d5a646e69a22
[debug] GET request for person/login from 192.168.56.1
[debug] Path is person/login
[debug] Rendering template person/login.tt
[debug] Found sessionid 6f332e165af682b03622e1b74318d5a646e69a22 in cookie
[debug] Restored session 6f332e165af682b03622e1b74318d5a646e69a22
[debug] Response Code: 200; Content-Type: text/html; charset=utf-8; 
Content-Length: 7723

[info] Request took 0.077044s (12.980/s)
.+---.
| Action | Time  |
++---+
| /auto  | 0.003336s |
| /person/auto   | 0.002680s |
| /person/login  | 0.000187s |
| /end   | 0.006762s |
|  - expert::View::HTML-process| 0.005926s |
'+---'

[info] *** Request 15 (0.600/s) [1678] [Tue Mar  6 15:12:59 2012] ***
[debug] Found sessionid 6f332e165af682b03622e1b74318d5a646e69a22 in cookie
[debug] Restored session 6f332e165af682b03622e1b74318d5a646e69a22
[debug] GET request for person/login from 192.168.56.1
[debug] Path is person/login
[debug] Rendering template person/login.tt
[debug] Found sessionid 6f332e165af682b03622e1b74318d5a646e69a22 in cookie
[debug] Restored session 6f332e165af682b03622e1b74318d5a646e69a22
[debug] Response Code: 200; Content-Type: text/html; charset=utf-8; 
Content-Length: 7723

[info] Request took 0.026152s (38.238/s)
.+---.
| Action | Time  |
++---+
| /auto  | 0.002289s |
| /person/auto   | 0.001404s |
| /person/login  | 0.000108s |
| /end   | 0.004584s |
|  - expert::View::HTML-process| 0.003944s |
'+---'*/

So I have the same rendering process twice. Always and everywhere. Even 
the install on the production-server (fastcgi) has the same problem.
This leads to several problems, as you will know. Can you tell me where 
to search for that issue or do you have an idea what the problem might be?


Regards,
Martin

___
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] Requests get rendered twice.. TT-Template (View::HTML-process)

2012-03-06 Thread Francisco Obispo
Could it be your browser attempting to pre-fetch content?




On Mar 6, 2012, at 9:38 AM, Martin Gillmaier wrote:

 Hello to All!
 
 First, I am a perl-programmer and I am about to accomplish my first 
 catalyst-project.
 Catalyst is really nice and flexible, and I am happy to get used to it.
 However, I kindly like you ask you about an issue, that I just can't 
 understand and that is driving me mad:
 
 I view the debug output in the terminal/bash:
 $ script/expert_server.pl -r
 
 And each time I do a request to the browser, I see an output like this in my 
 bash: 
 
 [info] *** Request 14 (0.560/s) [1678] [Tue Mar  6 15:12:59 2012] ***
 [debug] Found sessionid 6f332e165af682b03622e1b74318d5a646e69a22 in cookie
 [debug] Restored session 6f332e165af682b03622e1b74318d5a646e69a22
 [debug] GET request for person/login from 192.168.56.1
 [debug] Path is person/login
 [debug] Rendering template person/login.tt
 [debug] Found sessionid 6f332e165af682b03622e1b74318d5a646e69a22 in cookie
 [debug] Restored session 6f332e165af682b03622e1b74318d5a646e69a22
 [debug] Response Code: 200; Content-Type: text/html; charset=utf-8; 
 Content-Length: 7723
 [info] Request took 0.077044s (12.980/s)
 .+---.
 | Action | Time  |
 ++---+
 | /auto  | 0.003336s |
 | /person/auto   | 0.002680s |
 | /person/login  | 0.000187s |
 | /end   | 0.006762s |
 |  - expert::View::HTML-process| 0.005926s |
 '+---'
 
 [info] *** Request 15 (0.600/s) [1678] [Tue Mar  6 15:12:59 2012] ***
 [debug] Found sessionid 6f332e165af682b03622e1b74318d5a646e69a22 in cookie
 [debug] Restored session 6f332e165af682b03622e1b74318d5a646e69a22
 [debug] GET request for person/login from 192.168.56.1
 [debug] Path is person/login
 [debug] Rendering template person/login.tt
 [debug] Found sessionid 6f332e165af682b03622e1b74318d5a646e69a22 in cookie
 [debug] Restored session 6f332e165af682b03622e1b74318d5a646e69a22
 [debug] Response Code: 200; Content-Type: text/html; charset=utf-8; 
 Content-Length: 7723
 [info] Request took 0.026152s (38.238/s)
 .+---.
 | Action | Time  |
 ++---+
 | /auto  | 0.002289s |
 | /person/auto   | 0.001404s |
 | /person/login  | 0.000108s |
 | /end   | 0.004584s |
 |  - expert::View::HTML-process| 0.003944s |
 '+---'
 
 So I have the same rendering process twice. Always and everywhere. Even the 
 install on the production-server (fastcgi) has the same problem.
 This leads to several problems, as you will know. Can you tell me where to 
 search for that issue or do you have an idea what the problem might be?
 
 Regards,
 Martin 
 
 ___
 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/

Francisco Obispo 
email: fobi...@isc.org
Phone: +1 650 423 1374 || INOC-DBA *3557* NOC
PGP KeyID = B38DB1BE


___
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] Requests get rendered twice.. TT-Template (View::HTML-process)

2012-03-06 Thread Martin Gillmaier

Thanks for your reply.

I couldn't imagine all the browsers do 2 requests. But I checked using 
Firefox::Tamper. There I see only one request to my controller/action, 
and one to the .css file. But still there are 2 Requests in the 
console-output.


*15:57:37.446[74ms][total 4163ms] Status: 200[OK]
GET http://buntu:3000/person/login Load Flags[LOAD_DOCUMENT_URI  
LOAD_INITIAL_DOCUMENT_URI  ] Größe des Inhalts[7723] Mime Type[text/html]

   Request Header:
  Host[buntu:3000]
  User-Agent[Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; 
rv:10.0.2) Gecko/20100101 Firefox/10.0.2]
  
Accept[text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8]

  Accept-Language[de-de,de;q=0.8,en-us;q=0.5,en;q=0.3]
  Accept-Encoding[gzip, deflate]
  DNT[1]
  Connection[keep-alive]
  Referer[http://buntu:3000/person/login]
  Cookie[expert_session=6f332e165af682b03622e1b74318d5a646e69a22]
   Response Header:
  Connection[close]
  Date[Tue, 06 Mar 2012 14:57:37 GMT]
  Content-Length[7723]
  Content-Type[text/html; charset=utf-8]
  Last-Modified[37]
  112[2]
  57[15]
  6[2]
  65[0]
  
Set-Cookie[expert_session=6f332e165af682b03622e1b74318d5a646e69a22; 
path=/; expires=Tue, 06-Mar-2012 15:57:37 GMT; HttpOnly]

  Status[200]
  X-Catalyst[5.80022]

15:57:37.550[0ms][total 0ms] Status: pending[]
GET http://buntu:3000/static/css/common.css Load Flags[LOAD_NORMAL] 
Größe des Inhalts[unknown] Mime Type[unknown]

   Request Header:
  Host[buntu:3000]
  User-Agent[Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; 
rv:10.0.2) Gecko/20100101 Firefox/10.0.2]

  Accept[text/css,*/*;q=0.1]
  Accept-Language[de-de,de;q=0.8,en-us;q=0.5,en;q=0.3]
  Accept-Encoding[gzip, deflate]
  DNT[1]
  Connection[keep-alive]
  Referer[http://buntu:3000/person/login]
  Cookie[expert_session=6f332e165af682b03622e1b74318d5a646e69a22]*

and the log says:

*[info] *** Request 11 (0.036/s) [1955] [Tue Mar  6 15:57:37 2012] ***
[debug] Found sessionid 6f332e165af682b03622e1b74318d5a646e69a22 in cookie
[debug] Restored session 6f332e165af682b03622e1b74318d5a646e69a22
[debug] GET request for person/login from 192.168.56.1
[debug] Path is person/login
[debug] Rendering template person/login.tt
[debug] Found sessionid 6f332e165af682b03622e1b74318d5a646e69a22 in cookie
[debug] Restored session 6f332e165af682b03622e1b74318d5a646e69a22
[debug] Response Code: 200; Content-Type: text/html; charset=utf-8; 
Content-Length: 7723

[info] Request took 0.037200s (26.882/s)
.+---.
| Action | Time  |
++---+
| /auto  | 0.002057s |
| /person/auto   | 0.001919s |
| /person/login  | 0.000186s |
| /end   | 0.006611s |
|  - expert::View::HTML-process| 0.005815s |
'+---'

[info] *** Request 12 (0.039/s) [1955] [Tue Mar  6 15:57:41 2012] ***
[debug] Found sessionid 6f332e165af682b03622e1b74318d5a646e69a22 in cookie
[debug] Restored session 6f332e165af682b03622e1b74318d5a646e69a22
[debug] GET request for person/login from 192.168.56.1
[debug] Path is person/login
[debug] Rendering template person/login.tt
[debug] Found sessionid 6f332e165af682b03622e1b74318d5a646e69a22 in cookie
[debug] Restored session 6f332e165af682b03622e1b74318d5a646e69a22
[debug] Response Code: 200; Content-Type: text/html; charset=utf-8; 
Content-Length: 7723

[info] Request took 0.077878s (12.841/s)
.+---.
| Action | Time  |
++---+
| /auto  | 0.002543s |
| /person/auto   | 0.001362s |
| /person/login  | 0.000109s |
| /end   | 0.005176s |
|  - expert::View::HTML-process| 0.004524s |
'+---'
*

Kind regards,
Martin




Am 06.03.12 15:44, schrieb Francisco Obispo:

Could it be your browser attempting to pre-fetch content?




On Mar 6, 2012, at 9:38 AM, Martin Gillmaier wrote:


Hello to All!

First, I am a perl-programmer and I am about to accomplish my first 
catalyst-project.
Catalyst is really nice and flexible, and I am happy to get used to it.
However, I kindly like you ask you about an issue, that I just can't understand 
and that is driving me mad:

I 

[Catalyst] HTML::FormHandler help!

2012-03-06 Thread Sungsam Gong
Dear Gerda,

Thanks for making HTML::FormHandler, which I found very useful.

I was trying to make a simple registration page using
HTML::FormHandler, but couldn't make it through.
The form itself looks OK, but after clicking the submit button, I got
an error message which I dumped below:

Can't call method insert on an undefined value at
/home/sung/perl5/lib/perl5/DBIx/Class/Row.pm line 350. at
/home/sung/perl5/lib/perl5/DBIx/Class/Schema.pm line 1088

DBIx::Class::Schema::throw_exception('Nectar::Schema::NECTAR=HASH(0x7e90250)',
'Can\'t call method insert on an undefined value at /home/su...')
called at /home/sung/perl5/lib/perl5/DBIx/Class/Storage.pm line 111

DBIx::Class::Storage::throw_exception('DBIx::Class::Storage::DBI::mysql=HASH(0x7e43400)',
'Can\'t call method insert on an undefined value at /home/su...')
called at /home/sung/perl5/lib/perl5/DBIx/Class/Storage.pm line 197

DBIx::Class::Storage::__ANON__('DBIx::Class::Storage::DBI::mysql=HASH(0x7e43400)',
'Can\'t call method insert on an undefined value at /home/su...')
called at /home/sung/perl5/lib/perl5/DBIx/Class/Storage.pm line 218
DBIx::Class::Storage::__ANON__('Can\'t call method insert on an
undefined value at /home/su...') called at
/home/sung/perl5/lib/perl5/Try/Tiny.pm line 100
Try::Tiny::try('CODE(0xa780550)', 'Try::Tiny::Catch=REF(0xa847900)',
'Try::Tiny::Finally=REF(0xa6298f0)') called at
/home/sung/perl5/lib/perl5/DBIx/Class/Storage.pm line 258
DBIx::Class::Storage::txn_do('undef', 'undef') called at
/home/sung/perl5/lib/perl5/DBIx/Class/Storage/DBI.pm line 807

DBIx::Class::Storage::DBI::txn_do('DBIx::Class::Storage::DBI::mysql=HASH(0x7e43400)',
'CODE(0xa7f98b0)') called at
/home/sung/perl5/lib/perl5/DBIx/Class/Schema.pm line 660
DBIx::Class::Schema::txn_do('Nectar::Schema::NECTAR=HASH(0x7e90250)',
'CODE(0xa7f98b0)') called at
/home/sung/perl5/lib/perl5/HTML/FormHandler/TraitFor/Model/DBIC.pm
line 87

HTML::FormHandler::TraitFor::Model::DBIC::update_model('Nectar::Form::Register=HASH(0xa0c39c0)')
called at /home/sung/perl5/lib/perl5/HTML/FormHandler.pm line 296
HTML::FormHandler::run('Nectar::Form::Register=HASH(0xa0c39c0)',
'item', 'Nectar::WebV2::Model::NECTAR::User=HASH(0xa18ed70)',
'params', 'HASH(0xa19f2e0)', 'schema',
'Nectar::Schema::NECTAR=HASH(0x7e90250)') called at
/data/Serve/Web/Cardiacdb.org/Nectar-WebDev/script/../lib/Nectar/WebV2/Controller/Auth.pm
line 83

Nectar::WebV2::Controller::Auth::register('Nectar::WebV2::Controller::Auth=HASH(0x80c77e0)',
'Nectar::WebV2=HASH(0xa0e9840)') called at
/home/sung/perl5/lib/perl5/Catalyst/Action.pm line 65
Catalyst::Action::execute('Catalyst::Action=HASH(0x94c9740)',
'Nectar::WebV2::Controller::Auth=HASH(0x80c77e0)',
'Nectar::WebV2=HASH(0xa0e9840)') called at
/home/sung/perl5/lib/perl5/Catalyst.pm line 1667
eval {...} called at /home/sung/perl5/lib/perl5/Catalyst.pm line 1667


The Controller::Auth::register looks like:

use Nectar::Form::Register;
my $form = Nectar::Form::Register-new;

# Stash the form and the template to render it
$c-stash(template = 'Form/register.tt2', form= $form);

# Create an empty row object for the desired table
my $new_user= $c-model(NECTAR::User)-new_result( {} );

# Process the form with the parameters, a schema and a row object
$form-process(
item   = $new_user,
params = $c-request-parameters,
schema = $c-model(NECTAR)-schema,
);

You may find that there's 'schema' attribute within the process, which
you might think it's irrelevant here.
However if I delete it (e.g. only 'item' and 'params' as per manual),
I got an error shown below:

Caught exception in Nectar::WebV2::Controller::Auth-register Can't
call method _count_select on an undefined value at
/home/sung/perl5/lib/perl5/DBIx/Class/ResultSet.pm line 1494.

My app is based on:
Catalyst 5.90007
DBIx::Class 0.08196
HTML::FormHandler 0.36003
Perl v5.8.8
Linux version 2.6.18-274.17.1.el5.centos.plus
(mockbu...@builder10.centos.org) (gcc version 4.1.2 20080704 (Red Hat
4.1.2-51))

Just to add up, installation of HTML::FormHandler failed via cpanm:

Perl v5.10.0 required--this is only v5.8.8, stopped at
/home/sung/.cpanm/work/1330962009.9533/HTML-FormHandler-0.36003/blib/lib/HTML/FormHandler/Foo.pm
line 9.
BEGIN failed--compilation aborted at
/home/sung/.cpanm/work/1330962009.9533/HTML-FormHandler-0.36003/blib/lib/HTML/FormHandler/Foo.pm
line 9.
Compilation failed in require at t/config.t line 13.
BEGIN failed--compilation aborted at t/config.t line 13.
...
Test Summary Report
---
t/config.t (Wstat: 2304 Tests: 0 Failed: 0)
  Non-zero exit status: 9
  Parse errors: No plan found in TAP output
Files=59, Tests=1145, 96 wallclock secs ( 0.27 usr  0.09 sys + 88.52
cusr  3.05 csys = 91.93 CPU)
Result: FAIL
Failed 1/59 test programs. 0/1145 subtests failed.
make: *** [test_dynamic] Error 255
- FAIL Installing 

Re: [Catalyst] Wiki down

2012-03-06 Thread Devin Austin
Well volunteered!

On Tue, Mar 6, 2012 at 1:29 AM, Tobias Kremer tobias.kre...@gmail.com wrote:
 Just a heads up: The Catalyst wiki is down since at least yesterday.
 Does nobody monitor these things? Compared to other frameworks, the
 whole site looks horrible enough, we should at least try to keep it
 working. Links to MetaCPAN instead of plain old CPAN would be nice as
 well. Is there a public repo for the site?

 Thanx!

 --Toby

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



-- 
Devin Austin
http://www.dhoss.net
9702906669 - Cell

___
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] Connect DBIx::Class model on startup?

2012-03-06 Thread Daniel J. Luke
On Mar 5, 2012, at 10:01 AM, Daniel J. Luke wrote:
 Unless you've specifically done something to break how things normally work, 
 then it'll work fine.
 
 I don't think I've done anything unusual.


I guess I was wrong ;-) 

A little time in the perl debugger and I found where my ACCEPT_CONTEXT method 
was actually causing the error I was seeing.

Everything works great now. 

Thanks for the help (and sorry for the extra noise).

--
Daniel J. Luke  
 
++  
  
| * dl...@geeklair.net * |  

| *-- http://www.geeklair.net -* |  

++  
  
|   Opinions expressed are mine and do not necessarily   |  

|  reflect the opinions of my employer.  |  

++




___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Re: HTML::FormHandler help!

2012-03-06 Thread Gerda Shank

On 3/6/12 12:13 PM, Sungsam Gong wrote:

Dear Gerda,

Thanks for making HTML::FormHandler, which I found very useful.

I was trying to make a simple registration page using
HTML::FormHandler, but couldn't make it through.
The form itself looks OK, but after clicking the submit button, I got
an error message which I dumped below:


Sungsam:

You've left off a lot of the pertinent information, including your form 
and the result source class. This:  Nectar::WebV2::Model::NECTAR::User 
doesn't look exactly like a DBIC row object, just from the name. And 
since the update code is failing, there's got to be something wrong in 
the relationship to DBIC. The update is done in the 'update_model' sub. 
You might want to see what's in the $form-value that's supposed to be 
passed to DBIx::Class::ResultSet::RecursiveUpdate. That interface is 
pretty simple. You can take the value hashref and pass it to 
RecursiveUpdate yourself, which might be easier to debug.


Gerda




___
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] Wiki down

2012-03-06 Thread Dimitar Petrov
I've asked yesterday at #catalyst and it seems to be unmodified mojomojo
installation. The reason it's 503ing sometimes is probably memory leak. You
can ask there to get more information.

Dimi

On Tue, Mar 6, 2012 at 8:07 PM, Tobias Kremer tobias.kre...@gmail.comwrote:

 If you point me to a repo of the site...

 --Toby


 On 06.03.2012, at 18:44, Devin Austin devin.aus...@gmail.com wrote:

  Well volunteered!
 
  On Tue, Mar 6, 2012 at 1:29 AM, Tobias Kremer tobias.kre...@gmail.com
 wrote:
  Just a heads up: The Catalyst wiki is down since at least yesterday.
  Does nobody monitor these things? Compared to other frameworks, the
  whole site looks horrible enough, we should at least try to keep it
  working. Links to MetaCPAN instead of plain old CPAN would be nice as
  well. Is there a public repo for the site?
 
  Thanx!
 
  --Toby
 
  ___
  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/
 
 
 
  --
  Devin Austin
  http://www.dhoss.net
  9702906669 - Cell
 
  ___
  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/