[Catalyst] Weird error with View::JSON

2010-09-07 Thread Mesdaq, Ali
Hey all,

I am getting a weird error when I start/restart my catalyst server. The error 
does not seem to be stopping anything from working from what I can tell.

This is the error:
Tried to write to the catalyst_component_name accessor - is your component 
broken or just mad? (Write ignored - using default value.) at 
/usr/local/share/perl/5.10.0/Catalyst/Component.pm line 72
Class::MOP::Class:::around('CODE(0xad23638)', 
'web::View::JSON=HASH(0xb909088)', 'web::View::JSON') called at 
/usr/local/lib/perl/5.10.0/Class/MOP/Method/Wrapped.pm line 159

Class::MOP::Method::Wrapped::__ANON__('web::View::JSON=HASH(0xb909088)', 
'web::View::JSON') called at 
/usr/local/lib/perl/5.10.0/Class/MOP/Method/Wrapped.pm line 89

Catalyst::Component::catalyst_component_name('web::View::JSON=HASH(0xb909088)', 
'web::View::JSON') called at /usr/share/perl5/Catalyst/View/JSON.pm line 19
Catalyst::View::JSON::new('web::View::JSON', 'web', 'HASH(0xaef5488)') 
called at /usr/local/share/perl/5.10.0/Catalyst/Component.pm line 110
Catalyst::Component::COMPONENT('web::View::JSON', 'web', 
'HASH(0xaef5488)') called at /usr/local/share/perl/5.10.0/Catalyst.pm line 2328
eval {...} called at /usr/local/share/perl/5.10.0/Catalyst.pm line 2328
Catalyst::setup_component('web', 'web::View::JSON') called at 
/usr/local/share/perl/5.10.0/Catalyst.pm line 2242
Catalyst::setup_components('web') called at 
/usr/local/share/perl/5.10.0/Catalyst.pm line 1125
Catalyst::setup('web') called at 
/SecTech/trunk/job/tests/tatooine/web/script/../lib/web.pm line 61
require web.pm called at script/web_server.pl line 66
main::__ANON__() called at 
/usr/local/share/perl/5.10.0/Catalyst/Restarter/Forking.pm line 20

Catalyst::Restarter::Forking::_fork_and_start('Catalyst::Restarter::Forking=HASH(0xaee37d8)')
 called at /usr/local/share/perl/5.10.0/Catalyst/Restarter.pm line 68

Catalyst::Restarter::run_and_watch('Catalyst::Restarter::Forking=HASH(0xaee37d8)')
 called at script/web_server.pl line 104


Any ideas or pointers would be appreciated.

Thanks,
ALI MESDAQ
Sr. Security Researcher

WEBSENSE, INC.
ph: +1.858.320.9466
fax: +1.858.784.4466
www.websense.com

Websense TRITON™
For Essential Information Protection™
Web Security | Data Security | Email Security




 Protected by Websense Hosted Email Security -- www.websense.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/


Re: [Catalyst] Weird error with View::JSON

2010-09-07 Thread Devin Austin
On Tue, Sep 7, 2010 at 10:42 AM, Mesdaq, Ali ames...@websense.com wrote:

 Hey all,

 I am getting a weird error when I start/restart my catalyst server. The
 error does not seem to be stopping anything from working from what I can
 tell.

 This is the error:
 Tried to write to the catalyst_component_name accessor - is your component
 broken or just mad? (Write ignored - using default value.) at
 /usr/local/share/perl/5.10.0/Catalyst/Component.pm line 72
Class::MOP::Class:::around('CODE(0xad23638)',
 'web::View::JSON=HASH(0xb909088)', 'web::View::JSON') called at
 /usr/local/lib/perl/5.10.0/Class/MOP/Method/Wrapped.pm line 159

  Class::MOP::Method::Wrapped::__ANON__('web::View::JSON=HASH(0xb909088)',
 'web::View::JSON') called at
 /usr/local/lib/perl/5.10.0/Class/MOP/Method/Wrapped.pm line 89

  
 Catalyst::Component::catalyst_component_name('web::View::JSON=HASH(0xb909088)',
 'web::View::JSON') called at /usr/share/perl5/Catalyst/View/JSON.pm line 19
Catalyst::View::JSON::new('web::View::JSON', 'web',
 'HASH(0xaef5488)') called at
 /usr/local/share/perl/5.10.0/Catalyst/Component.pm line 110
Catalyst::Component::COMPONENT('web::View::JSON', 'web',
 'HASH(0xaef5488)') called at /usr/local/share/perl/5.10.0/Catalyst.pm line
 2328
eval {...} called at /usr/local/share/perl/5.10.0/Catalyst.pm line
 2328
Catalyst::setup_component('web', 'web::View::JSON') called at
 /usr/local/share/perl/5.10.0/Catalyst.pm line 2242
Catalyst::setup_components('web') called at
 /usr/local/share/perl/5.10.0/Catalyst.pm line 1125
Catalyst::setup('web') called at
 /SecTech/trunk/job/tests/tatooine/web/script/../lib/web.pm line 61
require web.pm called at script/web_server.pl line 66
main::__ANON__() called at
 /usr/local/share/perl/5.10.0/Catalyst/Restarter/Forking.pm line 20

  
 Catalyst::Restarter::Forking::_fork_and_start('Catalyst::Restarter::Forking=HASH(0xaee37d8)')
 called at /usr/local/share/perl/5.10.0/Catalyst/Restarter.pm line 68

  
 Catalyst::Restarter::run_and_watch('Catalyst::Restarter::Forking=HASH(0xaee37d8)')
 called at script/web_server.pl line 104


 Any ideas or pointers would be appreciated.

 Thanks,
 ALI MESDAQ
 Sr. Security Researcher

 WEBSENSE, INC.
 ph: +1.858.320.9466
 fax: +1.858.784.4466
 www.websense.com

 Websense TRITON™
 For Essential Information Protection™
 Web Security | Data Security | Email Security




  Protected by Websense Hosted Email Security -- www.websense.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/


What does your View::JSON look like?

-- 
Devin Austin
http://www.codedright.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/


[Catalyst] How to share a database connection across multiple Catalyst apps?

2010-09-07 Thread Simon Miner
Hi,

I am running 3 separate Catalyst (version '5.80022) apps that use a common
(Oracle 11g) database.  Each app has a model class which wraps around a
common DBIC schema class, like so.

-

package App1::Model::DB;



use strict;

use base 'Catalyst::Model::DBIC::Schema';



__PACKAGE__-config(

schema_class = Common::DB::Schema',

);

1;

-

package App2::Model::DB;



use strict;

use base 'Catalyst::Model::DBIC::Schema';



__PACKAGE__-config(

schema_class = Common::DB::Schema',

);

1;

-

package App3::Model::DB;



use strict;

use base 'Catalyst::Model::DBIC::Schema';



__PACKAGE__-config(

schema_class = Common::DB::Schema',

);

1;

-

This setup passes changes to the Common::DB::Schema class on to the Catalyst
app model classes.



All three of these apps run under a single Apache 1.3.42/mod_perl 1.31
server.  It appears that each server process creates a unique database
connection variable for each of these apps. Although these database
connections get reused from request to request, I would like to make things
even more efficient by having a single database connection variable per
server process which gets shared across all 3 Catalyst apps.  How do I
update my model to accomplish this?



Thanks.

-- 
-- Simon
___
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] Weird error with View::JSON

2010-09-07 Thread Mesdaq, Ali
package web::View::JSON;

use strict;
use warnings;
use parent 'Catalyst::View::JSON';

1;

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

From: Devin Austin [mailto:devin.aus...@gmail.com]
Sent: Tuesday, September 07, 2010 10:52 AM
To: The elegant MVC web framework
Subject: Re: [Catalyst] Weird error with View::JSON


On Tue, Sep 7, 2010 at 10:42 AM, Mesdaq, Ali 
ames...@websense.commailto:ames...@websense.com wrote:
Hey all,

I am getting a weird error when I start/restart my catalyst server. The error 
does not seem to be stopping anything from working from what I can tell.

This is the error:
Tried to write to the catalyst_component_name accessor - is your component 
broken or just mad? (Write ignored - using default value.) at 
/usr/local/share/perl/5.10.0/Catalyst/Component.pm line 72
   Class::MOP::Class:::around('CODE(0xad23638)', 
'web::View::JSON=HASH(0xb909088)', 'web::View::JSON') called at 
/usr/local/lib/perl/5.10.0/Class/MOP/Method/Wrapped.pm line 159
   Class::MOP::Method::Wrapped::__ANON__('web::View::JSON=HASH(0xb909088)', 
'web::View::JSON') called at 
/usr/local/lib/perl/5.10.0/Class/MOP/Method/Wrapped.pm line 89
   
Catalyst::Component::catalyst_component_name('web::View::JSON=HASH(0xb909088)', 
'web::View::JSON') called at /usr/share/perl5/Catalyst/View/JSON.pm line 19
   Catalyst::View::JSON::new('web::View::JSON', 'web', 'HASH(0xaef5488)') 
called at /usr/local/share/perl/5.10.0/Catalyst/Component.pm line 110
   Catalyst::Component::COMPONENT('web::View::JSON', 'web', 
'HASH(0xaef5488)') called at /usr/local/share/perl/5.10.0/Catalyst.pm line 2328
   eval {...} called at /usr/local/share/perl/5.10.0/Catalyst.pm line 2328
   Catalyst::setup_component('web', 'web::View::JSON') called at 
/usr/local/share/perl/5.10.0/Catalyst.pm line 2242
   Catalyst::setup_components('web') called at 
/usr/local/share/perl/5.10.0/Catalyst.pm line 1125
   Catalyst::setup('web') called at 
/SecTech/trunk/job/tests/tatooine/web/script/../lib/web.pmhttp://web.pm line 
61
   require web.pmhttp://web.pm called at 
script/web_server.plhttp://web_server.pl line 66
   main::__ANON__() called at 
/usr/local/share/perl/5.10.0/Catalyst/Restarter/Forking.pm line 20
   
Catalyst::Restarter::Forking::_fork_and_start('Catalyst::Restarter::Forking=HASH(0xaee37d8)')
 called at /usr/local/share/perl/5.10.0/Catalyst/Restarter.pm line 68
   
Catalyst::Restarter::run_and_watch('Catalyst::Restarter::Forking=HASH(0xaee37d8)')
 called at script/web_server.plhttp://web_server.pl line 104


Any ideas or pointers would be appreciated.

Thanks,
ALI MESDAQ
Sr. Security Researcher

WEBSENSE, INC.
ph: +1.858.320.9466
fax: +1.858.784.4466
www.websense.comhttp://www.websense.com

Websense TRITON™
For Essential Information Protection™
Web Security | Data Security | Email Security




 Protected by Websense Hosted Email Security -- 
www.websense.comhttp://www.websense.com

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

What does your View::JSON look like?

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


Click 
herehttps://www.mailcontrol.com/sr/uwu5ZR6jAdzTndxI!oX7Uo9cpkuWnNqk7GcA6uNfeErgFbgbcUk1OE5w7THqwvWcvLNars4x0jXX9jTmmkEZ8A==
 to report this email as spam.
___
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] Weird error with View::JSON

2010-09-07 Thread Devin Austin
On Tue, Sep 7, 2010 at 12:10 PM, Mesdaq, Ali ames...@websense.com wrote:

  package web::View::JSON;



 use strict;

 use warnings;

 use parent 'Catalyst::View::JSON';



 1;



 Thanks,

 --

 Ali Mesdaq (CISSP, GIAC-GREM)

 Sr. Security Researcher

 Websense Security Labs

 http://www.WebsenseSecurityLabs.com http://www.websensesecuritylabs.com/

 --



 *From:* Devin Austin [mailto:devin.aus...@gmail.com]
 *Sent:* Tuesday, September 07, 2010 10:52 AM
 *To:* The elegant MVC web framework
 *Subject:* Re: [Catalyst] Weird error with View::JSON





 On Tue, Sep 7, 2010 at 10:42 AM, Mesdaq, Ali ames...@websense.com wrote:

 Hey all,

 I am getting a weird error when I start/restart my catalyst server. The
 error does not seem to be stopping anything from working from what I can
 tell.

 This is the error:
 Tried to write to the catalyst_component_name accessor - is your component
 broken or just mad? (Write ignored - using default value.) at
 /usr/local/share/perl/5.10.0/Catalyst/Component.pm line 72
Class::MOP::Class:::around('CODE(0xad23638)',
 'web::View::JSON=HASH(0xb909088)', 'web::View::JSON') called at
 /usr/local/lib/perl/5.10.0/Class/MOP/Method/Wrapped.pm line 159

  Class::MOP::Method::Wrapped::__ANON__('web::View::JSON=HASH(0xb909088)',
 'web::View::JSON') called at
 /usr/local/lib/perl/5.10.0/Class/MOP/Method/Wrapped.pm line 89

  
 Catalyst::Component::catalyst_component_name('web::View::JSON=HASH(0xb909088)',
 'web::View::JSON') called at /usr/share/perl5/Catalyst/View/JSON.pm line 19
Catalyst::View::JSON::new('web::View::JSON', 'web',
 'HASH(0xaef5488)') called at
 /usr/local/share/perl/5.10.0/Catalyst/Component.pm line 110
Catalyst::Component::COMPONENT('web::View::JSON', 'web',
 'HASH(0xaef5488)') called at /usr/local/share/perl/5.10.0/Catalyst.pm line
 2328
eval {...} called at /usr/local/share/perl/5.10.0/Catalyst.pm line
 2328
Catalyst::setup_component('web', 'web::View::JSON') called at
 /usr/local/share/perl/5.10.0/Catalyst.pm line 2242
Catalyst::setup_components('web') called at
 /usr/local/share/perl/5.10.0/Catalyst.pm line 1125
Catalyst::setup('web') called at
 /SecTech/trunk/job/tests/tatooine/web/script/../lib/web.pm line 61
require web.pm called at script/web_server.pl line 66
main::__ANON__() called at
 /usr/local/share/perl/5.10.0/Catalyst/Restarter/Forking.pm line 20

  
 Catalyst::Restarter::Forking::_fork_and_start('Catalyst::Restarter::Forking=HASH(0xaee37d8)')
 called at /usr/local/share/perl/5.10.0/Catalyst/Restarter.pm line 68

  
 Catalyst::Restarter::run_and_watch('Catalyst::Restarter::Forking=HASH(0xaee37d8)')
 called at script/web_server.pl line 104


 Any ideas or pointers would be appreciated.

 Thanks,
 ALI MESDAQ
 Sr. Security Researcher

 WEBSENSE, INC.
 ph: +1.858.320.9466
 fax: +1.858.784.4466
 www.websense.com

 Websense TRITON™
 For Essential Information Protection™
 Web Security | Data Security | Email Security




  Protected by Websense Hosted Email Security -- www.websense.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/


 What does your View::JSON look like?

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

  Click 
 herehttps://www.mailcontrol.com/sr/uwu5ZR6jAdzTndxI!oX7Uo9cpkuWnNqk7GcA6uNfeErgFbgbcUk1OE5w7THqwvWcvLNars4x0jXX9jTmmkEZ8A==to
  report this email as spam.

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


What happens when you run it without the development server restarter stuff?

-- 
Devin Austin
http://www.codedright.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] How to share a database connection across multiple Catalyst apps?

2010-09-07 Thread Jason L. Froebe

Hi Simon,

Reducing the number of connections to the database from three to one 
will reduce the responsiveness and will definitely hurt when trying to 
debug issues (performance, etc).  My recommendation is that each 
application have at least one unique connection to the database.


jason


On 09/07/2010 12:59 PM, Simon Miner wrote:

Hi,

I am running 3 separate Catalyst (version '5.80022) apps that use a 
common (Oracle 11g) database. Each app has a model class which wraps 
around a common DBIC schema class, like so.


-

package App1::Model::DB;

use strict;

use base 'Catalyst::Model::DBIC::Schema';

__PACKAGE__-config(

schema_class = Common::DB::Schema',

);

1;


-

package App2::Model::DB;

use strict;

use base 'Catalyst::Model::DBIC::Schema';

__PACKAGE__-config(

schema_class = Common::DB::Schema',

);

1;

-

package App3::Model::DB;

use strict;

use base 'Catalyst::Model::DBIC::Schema';

__PACKAGE__-config(

schema_class = Common::DB::Schema',

);

1;

-

This setup passes changes to the Common::DB::Schema class on to the 
Catalyst app model classes.


All three of these apps run under a single Apache 1.3.42/mod_perl 1.31 
server. It appears that each server process creates a unique database 
connection variable for each of these apps. Although these database 
connections get reused from request to request, I would like to make 
things even more efficient by having a single database connection 
variable per server process which gets shared across all 3 Catalyst 
apps. How do I update my model to accomplish this?


Thanks.


--
-- Simon


___
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] How to share a database connection across multiple Catalyst apps?

2010-09-07 Thread Nicholas Wehr
I'm with Tom on this one. Unless you've narrowed all optimization efforts
and this is all you have left - it could be worth a try.. but as Jason
points out, you may not gain a thing. I'd recommend profiling your code and
tracking down performance issues from that base level. Please post your
results - I've very curious!

-nw

On Tue, Sep 7, 2010 at 7:21 PM, Tomas Doran bobtf...@bobtfish.net wrote:


 On 7 Sep 2010, at 18:59, Simon Miner wrote:

 All three of these apps run under a single Apache 1.3.42/mod_perl 1.31
 server.


 Wow, mod_perl 1 Ok then :)


   It appears that each server process creates a unique database connection
 variable for each of these apps. Although these database connections get
 reused from request to request, I would like to make things even more
 efficient by having a single database connection variable per server process
 which gets shared across all 3 Catalyst apps.


 Why do you think that this will help or affect anything?

 I.e. is this not premature optimisation?

 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/

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