Re: [Catalyst] Catalyst Model Issue

2011-08-02 Thread gordon
Hi

I am running the most up todate version of the following


  On Sun, Jul 31, 2011 at 12:18 PM,  gor...@gorste.plus.com wrote:
 To better help you, please indicate:

 - Operating System of the Catalyst App

          Ubuntu 8.04.4 LTS

 - RDBMS version and host OS

          Ubuntu 8.04.4 LTS using MySql  5.0.51a-3ubuntu5.8-log
          (same box as my catalyst application)


 The Perl in 8.04 is probably quite old.

 - DBD (DBI Driver)

          DBIx::Class                               0.08195
          DBIx::Class::Schema::Loader               0.07010
          DBIx::Class::Schema::Loader::DBI::mysql   0.07010
          DBIx::Class::Schema::Loader::DBI::SQLite  0.07010

 I get the same if I use sqllite or mysql so I think there is an issue
 with
 DBIx::Class.

 DBIx::Class works on top of the plain-old DBI/DBD scheme. So when I
 asked for the DBD I meant the actual DBI driver, examples:

 DBD::SQLite
 DBD::mysql
 DBD:;Pg

 Try static models like the following examples:

 When working with SQLite you must generate your model clases with the
 path to the DB file like so:

 script/[app]_create.pl model [model name] DBIC::Schema
 [app]::Schema::[model name] create=static
 dbi:SQLite:dbname=data/catmodels.db

 Assuming data/ exists from the root of the application

 When working with MySQL try something like this:

 script/[app]_create.pl model [model name] DBIC::Schema
 [app]::Schema::[model name] create=static dbi:mysql:[dbname] [user]
 [pass]

 If you are connecting to more than one DB just use different model
 names for each ;-)

 If the static model generation was successful you should be able to
 look inside the Schema Result classes and verify that you can actually
 see the relations defined in each class with every field, type and
 relationships (has_many, belongs_to etc.).

 If you are unable to generate the static DBIC model try a small
 program with plain-old DBI and see if you can actually connect to the
 DB and have the correct privileges to extract the schema.

 perldoc DBI

 Cheers,

 --
 Alejandro Imass






 Gordon


 On Fri, Jul 29, 2011 at 12:14 PM,  gor...@gorste.plus.com wrote:
 Alejandro

 I am using the create fuction catalyst provides,  I find that is the
 best
 way of creating the model.  Does it need 'source_name'  in the classes
 that it creates.



 Hi Gordon,

 To better help you, please indicate:

 - Operating System of the Catalyst App
 - RDBMS version and host OS
 - DBD (DBI Driver)

 ___
 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] Catalyst Model Issue

2011-08-02 Thread gordon
Alejandro

I am running uptodate version of DBD::mysql(4.019) and DBD::SQLite(1.33),
but the issue is not with me creating the schema that works fine.  The
problem is with creating a record via the model as described in the
catalyst documentation


   my $book = $c-model('DB::Book')-create({title  = $title,
rating = $rating });

I get the following error

DBIx::Class::ResultSet::create(): Unable to perform storage-dependent
operations with a detached result source (source '_unnamed_' is not
associated with a schema). at
./catalyst/test/script/../lib/test/Controller/Books.pm line 56

Gordon


 On Sun, Jul 31, 2011 at 12:18 PM,  gor...@gorste.plus.com wrote:
 To better help you, please indicate:

 - Operating System of the Catalyst App

          Ubuntu 8.04.4 LTS

 - RDBMS version and host OS

          Ubuntu 8.04.4 LTS using MySql  5.0.51a-3ubuntu5.8-log
          (same box as my catalyst application)


 The Perl in 8.04 is probably quite old.

 - DBD (DBI Driver)

          DBIx::Class                               0.08195
          DBIx::Class::Schema::Loader               0.07010
          DBIx::Class::Schema::Loader::DBI::mysql   0.07010
          DBIx::Class::Schema::Loader::DBI::SQLite  0.07010

 I get the same if I use sqllite or mysql so I think there is an issue
 with
 DBIx::Class.

 DBIx::Class works on top of the plain-old DBI/DBD scheme. So when I
 asked for the DBD I meant the actual DBI driver, examples:

 DBD::SQLite
 DBD::mysql
 DBD:;Pg

 Try static models like the following examples:

 When working with SQLite you must generate your model clases with the
 path to the DB file like so:

 script/[app]_create.pl model [model name] DBIC::Schema
 [app]::Schema::[model name] create=static
 dbi:SQLite:dbname=data/catmodels.db

 Assuming data/ exists from the root of the application

 When working with MySQL try something like this:

 script/[app]_create.pl model [model name] DBIC::Schema
 [app]::Schema::[model name] create=static dbi:mysql:[dbname] [user]
 [pass]

 If you are connecting to more than one DB just use different model
 names for each ;-)

 If the static model generation was successful you should be able to
 look inside the Schema Result classes and verify that you can actually
 see the relations defined in each class with every field, type and
 relationships (has_many, belongs_to etc.).

 If you are unable to generate the static DBIC model try a small
 program with plain-old DBI and see if you can actually connect to the
 DB and have the correct privileges to extract the schema.

 perldoc DBI

 Cheers,

 --
 Alejandro Imass






 Gordon


 On Fri, Jul 29, 2011 at 12:14 PM,  gor...@gorste.plus.com wrote:
 Alejandro

 I am using the create fuction catalyst provides,  I find that is the
 best
 way of creating the model.  Does it need 'source_name'  in the classes
 that it creates.



 Hi Gordon,

 To better help you, please indicate:

 - Operating System of the Catalyst App
 - RDBMS version and host OS
 - DBD (DBI Driver)

 ___
 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] Catalyst Model Issue

2011-07-31 Thread gordon
 To better help you, please indicate:

 - Operating System of the Catalyst App

  Ubuntu 8.04.4 LTS

 - RDBMS version and host OS

  Ubuntu 8.04.4 LTS using MySql  5.0.51a-3ubuntu5.8-log
  (same box as my catalyst application)

 - DBD (DBI Driver)

  DBIx::Class   0.08195
  DBIx::Class::Schema::Loader   0.07010
  DBIx::Class::Schema::Loader::DBI::mysql   0.07010
  DBIx::Class::Schema::Loader::DBI::SQLite  0.07010

I get the same if I use sqllite or mysql so I think there is an issue with
DBIx::Class.

Gordon


 On Fri, Jul 29, 2011 at 12:14 PM,  gor...@gorste.plus.com wrote:
 Alejandro

 I am using the create fuction catalyst provides,  I find that is the
 best
 way of creating the model.  Does it need 'source_name'  in the classes
 that it creates.



 Hi Gordon,

 To better help you, please indicate:

 - Operating System of the Catalyst App
 - RDBMS version and host OS
 - DBD (DBI Driver)

 ___
 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] Catalyst Model Issue

2011-07-29 Thread gordon
Alejandro

I am using the create fuction catalyst provides,  I find that is the best
way of creating the model.  Does it need 'source_name'  in the classes
that it creates.

Regards

Gordon


 On Tue, Jul 26, 2011 at 1:51 PM,  gor...@gorste.plus.com wrote:
 Hi

 When I call create on a result set like the same in the catalyst
 documentation like

               my $book = $c-model('DB::Book')-create({title  =
 $title,
 rating = $rating });

 I get the following error

 DBIx::Class::ResultSet::create(): Unable to perform storage-dependent
 operations with a detached result source (source '_unnamed_' is not
 associated with a schema). at
 ./catalyst/test/script/../lib/test/Controller/Books.pm line 56

 Did you create the Schema classes yourself? or did you use the
 _create.pl script?

 I have found that static creation using the create helper script is
 the best solution because it gives you the flexibility to extend the
 DBIC model and it's also very easy to upgrade when your DB changes.
 The way to use the create script for DBIC is:

 script/_create.pl model [model_name] DBIC::Schema [namespace]
 create=static dbi:[sriver]:dbname=data/catmodels.db [user] [pass]


 --
 Alejandro Imass

 ___
 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] Catalyst Model Issue

2011-07-26 Thread gordon
Hi

When I call create on a result set like the same in the catalyst
documentation like

   my $book = $c-model('DB::Book')-create({title  = $title,
rating = $rating });

I get the following error

DBIx::Class::ResultSet::create(): Unable to perform storage-dependent
operations with a detached result source (source '_unnamed_' is not
associated with a schema). at
./catalyst/test/script/../lib/test/Controller/Books.pm line 56

I am using the most up to date version of catalyst, DBIx::Class.  I am
also using it with a MySQL backend.

Is there a setting I need to set so this error messages goes away and
insert records into the database?  Has anyone had similar issues


I raised this issue with the DBIx::Class mailing list and they said:

The fix is to insert this line before you serialize the object:

# to let DBIC automatically pick up the correct schema in the child #
process after Storable freezed/thawed the result objects local

$DBIx::Class::ResultSourceHandle::thaw_schema = $rs-result_source-schema;

I am unsure where to put this in my application.  Has anyone have ideas
how to resolve this

Regards

Gordon



___
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] TheSchwartz - Catalyst::Model::Adaptor

2010-08-07 Thread gordon
Dear List.

I am writing a job queuing system in catalyst.  I have found an example of
a job queuing examples that uses TheSchwartz and catalyst through
Catalyst::Model::Adaptor.  Currently it uses Sqlite,  I need to use MySQL,
for me to do this I need to create TheSchwartz with augments like


use parent Catalyst::Model::Adaptor;

__PACKAGE__-config( class = TheSchwartz,
 args = { verbose = 1,

   databases = [{
 'dsn' = 'dbi:mysql:Schwart',
 'user' = 'db_user',
‘pass’ = ‘password’
   }
   ]
 }
 );


I just get the following when I run the server:

Couldn't instantiate component MyApp::Model::TheSchwartz, unknown
options HASH(0x3a71a30) at
/usr/local/share/perl/5.8.8/Catalyst/Model/Adaptor/Base.pm line
27Compilation failed in require at ./script/myapp_server.pl line 66.

Does anyone know of how I can fix this?

Once I get this working I will move it to prepare_arguments so that I can
get details out of the config file.

Regards,

Gordon



___
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] Catalyst 5.80021

2010-03-25 Thread gordon
Dear List

I have just updated to Catalyst 5.80021 from 5.8002 and now I am seeing
the following error when I restart my application.

Use of uninitialized value in list assignment at
/usr/local/share/perl/5.8.8/Catalyst/Engine/HTTP.pm line 371.

I get 8 of these in one go.

Can someone tell me if this is a known bug, or tell me how I can resolve
the issue?

Regards

Gordon



___
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] Hangs in RenderView in end

2009-07-16 Thread Gordon Yeong
2009/7/16 John Romkey rom...@apocalypse.org

 For what it's worth, I do my development under MacOS X 10.5 (currently
 10.5.7) and use FF 3.0.x (currently 3.0.11) as my primary browser for
 development and haven't run into any problems. I'm up-to-date on all the
 Catalyst packages. I normally run the built-in server with '-r -d' but
 deploy on a Debian system under Apache2 (also no problems).


Hi, John,.

  I believe K. akimoto was developing on an Ubuntu box and accessed his
application for testing with a Firefox 3/3.5 browser on Mac OS X for
testing.




 kakimoto and Gordon, you did catch the earlier bit from Gunnar that using
 CGI.pm with debugging turned on was the culprit for him, didn't you? Are you
 using CGI.pm in your app or templates?
- john romkey
http://www.romkey.com/



Yes, we did discuss that and I checked the codes with no sight of CGI.pm (at
least in the eyes of fgrep -iRn CGI projects/myApp



I do have something to announce (and K. akimoto's tried this too). It's that

he was running his app with scripts/myapp_server.pl  - that caused the
problem.

I read up on the new book on Catalyst (woo hoo!) and ran it with the -k
flag to keep connections alive (ie. scripts/myapp_server.pl -k) and that
seem to be stable (ie. Firefox 3/3.5 on Mac OS X was not hanging or taking
his server down).

Interesting but I am not entirely sure why Firefox 3/3.5 acts this way on
Mac OS X.
___
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] Hangs in RenderView in end

2009-07-15 Thread Gordon Yeong
hi, gents:)

 any ideas?
 I have tried firefox 3.0 and 3.5 on my mac os X and it causes
myapp_server.pl to hang (ie. cause the CPU server to go 100%).

 Running an strace just shows me


write(6, =\http://www.myexample.com.;..., 2715) = -1 EAGAIN (Resource
temporarily unavailable)
write(6, =\http://www.myexample.;..., 2715) = -1 EAGAIN (Resource
temporarily unavailable)
write(6, =\http://www.myexample.;..., 2715) = -1 EAGAIN (Resource
temporarily unavailable)
write(6, =\http://www.myexample.;..., 2715) = -1 EAGAIN (Resource
temporarily unavailable)
write(6, =\http://www.myexample.;..., 2715) = -1 EAGAIN (Resource
temporarily unavailable)
write(6, =\http://www.myexample.;..., 2715) = -1 EAGAIN (Resource
temporarily unavailable)
write(6, =\http://www.myexample.;..., 2715) = -1 EAGAIN (Resource
temporarily unavailable)
write(6, =\http://www.myexample.;..., 2715) = -1 EAGAIN (Resource
temporarily unavailable)
write(6, =\http://www.myexample.;..., 2715) = -1 EAGAIN (Resource
temporarily unavailable)







2009/7/13 Gordon Yeong anexi...@gmail.com

 I believe that firefox  on mac OS X has a bug.
  I have tested with other browsers on both Mac Os X and windows platforms
 without any problems. Here's what I used:

 Mac Os X 10.5

1. Safari

 Windows XP

1. internet explorer
2. firefox 3

 doesn't seem to have any issues.
  Any suggestions of how to prove this but such that I can perhaps log a
 call with the folks on mozilla?

 thanks:D

 Gordon


___
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] Hangs in RenderView in end

2009-07-15 Thread Gordon Yeong
hey K

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


Re: [Catalyst] Hangs in RenderView in end

2009-07-15 Thread Gordon Yeong
hey K,

 try running myApp_server.pl with -k . I tried it on my mac and it works
just fine!

:D anyway, would be interesting to find out why FF 3/3.5 causes the problem
it does on Mac.
___
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] Hangs in RenderView in end

2009-07-13 Thread Gordon Yeong
I believe that firefox  on mac OS X has a bug.
 I have tested with other browsers on both Mac Os X and windows platforms
without any problems. Here's what I used:

Mac Os X 10.5

   1. Safari

Windows XP

   1. internet explorer
   2. firefox 3

doesn't seem to have any issues.
 Any suggestions of how to prove this but such that I can perhaps log a call
with the folks on mozilla?

thanks:D

Gordon



2009/7/9 Gordon Yeong anexi...@gmail.com

 Mod deflate was never on because i made sure apache2 was shut down.
 I am using myapp_server.pl and the fault occurs.
 Tried to replicate the problem with safari and it doesn't occur.
 I believe there's some hidden complication with firefox.



 This isn't a fastcgi/mod_deflate issue is it? Are you running both? If so,
 turn off mod_deflate and see if it fixes?

 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] Hangs in RenderView in end

2009-07-08 Thread Gordon Yeong
hi there

I think i am facing the same fault.
 hmmm... When you mention TT.pm, do you mean the local TT.pm found in
myApp/View/TT.pm or is it the TT.pm belonging to the Template Toolkit
package?

thanks

Regards,
Gordon Yeong


2009/7/3 Gunnar Strand gunnarstr...@yahoo.com

 I found the problem. Turning on debugging for TT (DEBUG = DEBUG_ALL) in
 TT.pm showed that it hangs on the [% USE CGI %] directive. Apparently

 [% USE CGI('-no_debug') %]

 is needed. Got it from here:

 https://bugzilla.mozilla.org/show_bug.cgi?id=137589

 Seems CGI thinks that it is begin run from command line and prompts for
 data.

 KR,
 Gunnar
 --
 *From:* Gunnar Strand gunnarstr...@yahoo.com
 *To:* The elegant MVC web framework catalyst@lists.scsys.co.uk
 *Sent:* Monday, June 29, 2009 6:39:41 AM
 *Subject:* Re: [Catalyst] Hangs in RenderView in end

  Is there any way of running the server in a debugger or to turn tracing
 on? Can I send a signal to it to get it to dump a stack trace somehow? Any
 attempt I've made so far just results in nothing or segmentation faults.
 
 [...]
 
 I don't understand why you're seeing segfaults. What version of Catalyst
 are you using, what is your perl -V, and do you have the latest version of
 Variable::Magic installed? Also, if you could attach gdb and get the
 catalyst process to segfault, then a backtrace from c land could be useful.

 The debugger works now(!). I've always had problems with it but hadn't
 tried it for a while. Maybe a library got updated.

 Thanks for the tips!

 KR,
 Gunnar

 ___
 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] Hangs in RenderView in end

2009-07-08 Thread Gordon Yeong
hi there

 I am facing almost the same issue in that even clicking the stop button
on firefox would see no difference in the debugging terminal or have a
response from the webpage.
When i have safari accesssing the same page, i can submit without a problem
and the server doesn't hang.

 Any thoughts?

thanks

gordon

2009/7/8 Gordon Yeong anexi...@gmail.com


 hi there

 I think i am facing the same fault.
  hmmm... When you mention TT.pm, do you mean the local TT.pm found in
 myApp/View/TT.pm or is it the TT.pm belonging to the Template Toolkit
 package?

 thanks

 Regards,
 Gordon Yeong


 2009/7/3 Gunnar Strand gunnarstr...@yahoo.com

 I found the problem. Turning on debugging for TT (DEBUG = DEBUG_ALL) in
 TT.pm showed that it hangs on the [% USE CGI %] directive. Apparently

 [% USE CGI('-no_debug') %]

 is needed. Got it from here:

 https://bugzilla.mozilla.org/show_bug.cgi?id=137589

 Seems CGI thinks that it is begin run from command line and prompts for
 data.

 KR,
 Gunnar
 --
 *From:* Gunnar Strand gunnarstr...@yahoo.com
 *To:* The elegant MVC web framework catalyst@lists.scsys.co.uk
 *Sent:* Monday, June 29, 2009 6:39:41 AM
 *Subject:* Re: [Catalyst] Hangs in RenderView in end

   Is there any way of running the server in a debugger or to turn
 tracing on? Can I send a signal to it to get it to dump a stack trace
 somehow? Any attempt I've made so far just results in nothing or
 segmentation faults.
 
 [...]
 
 I don't understand why you're seeing segfaults. What version of Catalyst
 are you using, what is your perl -V, and do you have the latest version of
 Variable::Magic installed? Also, if you could attach gdb and get the
 catalyst process to segfault, then a backtrace from c land could be useful.

 The debugger works now(!). I've always had problems with it but hadn't
 tried it for a while. Maybe a library got updated.

 Thanks for the tips!

 KR,
 Gunnar

 ___
 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] Lighttpd and mod_perlite

2009-06-08 Thread Gordon Yeong
If you can, please suggest some links for reference.:) thanks

Regards,
Gordon Yeong



2009/6/1 Nigel Metheringham nigel.methering...@dev.intechnology.co.uk


 However, I, and many others, are using lighttpd with fastcgi with great
 success - there are a number of articles on this including a few advent
 calendar ones.

Nigel.
___
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] ACL Error: deny_access_unless

2009-06-03 Thread Gordon Stewart
 http://omni.state51.co.uk/~t0m/MyApp.tgz - there is your tarball  
 back, with git history of everything I did for your perusal.

I cannot seem to download the tarball from your site.  Did you give me an
internal website?

Regards 

Gordon 




___
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] Possible bug here?

2009-06-01 Thread Gordon Yeong
http://linux.wareseeker.com/Programming/template-plugin-page-0.10.zip/328911
___
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] ACL Error: deny_access_unless

2009-05-30 Thread Gordon Stewart
Tom

I have created a test app tar ball and put it online.  The link is:

http://www.gordonstewart.co.uk/MyApp.tar

I have taken the test app that is online and changed it to use mason and the
most up to date version of catalyst.  Is it using the test database, I also
allowed it to use Catalyst::Authentication::Store::Minimal.   It can be
configured in the yml file.

I am using the following plugin modules, which I believe to be the most up
to date:

Catalyst::Plugin::Authentication  0.10011  
Catalyst::Plugin::Authorization::ACL  0.11 
Catalyst::Plugin::Authorization::Roles  0.07   
Catalyst::Plugin::ConfigLoader  0.23   
Catalyst::Plugin::Session  0.22
Catalyst::Plugin::Session::State::Cookie  0.11 
Catalyst::Plugin::Session::Store::FastMmap  0.10   
Catalyst::Plugin::StackTrace  0.10 
Catalyst::Plugin::Static::Simple  0.21


Thank you for your help

Regards 

Gordon
 



-Original Message-
From: Tomas Doran [mailto:bobtf...@bobtfish.net] 
Sent: 28 May 2009 13:26
To: The elegant MVC web framework
Subject: Re: [Catalyst] ACL Error: deny_access_unless

Gordon Stewart wrote:
 I have created a test application to use
 
   Catalyst::Authentication::Store::Minimal
 
 But I am still having the same issue. 

Well, yes, I'd expect you would :)

The point of making a minimal test app was so you could show us, and we 
could download / play with something without having to setup a database 
etc to run your 'real' app, or wade through lots of code.

So, please show us? Either throw it on github, or stick a tarball online..

 How easy is it to downgrade catalyst 5.7012, which I know will work?

Just install it :)

Either download the tarball and perl Makefile.PL  make test  make 
install as usual, or you can ask the CPAN shell for 
AUTHORNAME/Package-X.YY.tgz and it'll install it.

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/


RE: [Catalyst] ACL Error: deny_access_unless

2009-05-30 Thread Gordon Stewart
Tom

 I tried to fix this, but something in the dependency stack of  
 DBIx::Class::HTMLWidget fails to install for me.

I have removed this

 I appreciate that there appear to be some fairly good tests in t/ 
 live_app01.t, but I think you can cut these (and the app) down a lot  
 to just demonstrating the issue you're having..

I have removed the tests that do not show off the problem I am facing, the
tests shows it is falling around request 14/15 as user test01 has admin
rights.

The new tar ball is at http://www.gordonstewart.co.uk/MyApp_v2.tar
 
Regards 

Gordon



___
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] ACL Error: deny_access_unless

2009-05-27 Thread Gordon Stewart

Tomas

I have created a test application to use

Catalyst::Authentication::Store::Minimal

But I am still having the same issue. 

I am using perl 5.8.8 and ubuntu 8.04 if that has a bearing on why roles are
broken.

How easy is it to downgrade catalyst 5.7012, which I know will work?

Gordon 



___
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] ACL Error: deny_access_unless

2009-05-26 Thread Gordon Stewart

Tomas

I have am not using an authentication store, I am just using:

Authentication
Authorization::Roles
Authorization::ACL

Session
Session::Store::FastMmap
Session::State::Cookie


If I include the store:

Authentication::Store::DBIC

Then I just get the following:

You must provide a user_class at /usr/local/share/perl/5.8.8/Catalyst.pm
line 1140

But I am passing the user_class though my yml file:

authorization:
dbic:
user_class: DnsEmail::Rights
#role_class: DnsEmail::Rights
role_field: description
role_rel: accesses
user_role_user_field: user_id

Regards

Gordon

-Original Message-
From: Tomas Doran [mailto:bobtf...@bobtfish.net] 
Sent: 26 May 2009 12:25
To: The elegant MVC web framework
Subject: Re: [Catalyst] ACL Error: deny_access_unless

Gordon Stewart wrote:
 Does anyone know where in the catalyst code it contacts the database to
 check if a user has the rights in question?

It should be calling $c-user-roles, and this gets the list of roles 
for the user in question.

How this lookup is performed will vary depending on which authentication 
store you're using, how it's configured etc.

   I have looked into the catalyst
 code (Catalyst/Plugin/Authorization/ACL/Engine.pm )and found out that the
 function in question is returning Denied without contacting the
database.
 I know it is not contacting the database because I have turn on the Mysql
 logs and see no sql query.
 
 I am running the most up to date version of the catalyst code (5.8004). 
 
 Has any one got roles and ACL working in Catalyst 5.8004  

There have been a few people having problems with this.

I know that I fixed ACL to work with Catalyst 5.80 specifically, in that 
I had to do some work to make it pass all of it's tests. However, 
obviously, as people are having issues - the tests may not be 
comprehensive enough..

So I guess we need to produce a minimal TestApp demonstrating the issue, 
and then we can either fix ACL, or fix core Catalyst as appropriate to 
sort the issue out.

This minimal test app would use the minimal authentication store (so no 
DB needed), and just demonstrate the issue (i.e. t/01app.t fails).

If you can produce such a TestApp, then I'll be more than happy to take 
a look, or beat someone else into doing so ;)

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/


RE: [Catalyst] ACL Error: deny_access_unless

2009-05-25 Thread Gordon Stewart
Dear List 

Does anyone know where in the catalyst code it contacts the database to
check if a user has the rights in question?  I have looked into the catalyst
code (Catalyst/Plugin/Authorization/ACL/Engine.pm )and found out that the
function in question is returning Denied without contacting the database.
I know it is not contacting the database because I have turn on the Mysql
logs and see no sql query.  

I am running the most up to date version of the catalyst code (5.8004). 

Has any one got roles and ACL working in Catalyst 5.8004  

Regards

Gordon Stewart

-Original Message-
From: gor...@gorste.plus.com [mailto:gor...@gorste.plus.com] 
Sent: 23 May 2009 17:22
To: catalyst@lists.scsys.co.uk
Subject: [Catalyst] ACL Error: deny_access_unless

Dear List

Has anyone have any issues with:

Catalyst::Plugin::Authorization::ACL  0.11 |
Catalyst::Plugin::Authorization::Roles  0.07

i am adding some access control to my catalyst application.  When I start
up my application I see the following:

Class Catalyst::Dispatcher is calling the deprecated method
Catalyst::Dispatcher::tree,
this will be removed in Catalyst 5.9X at
/usr/local/share/perl/5.8.8/Catalyst/Dispatcher.pm line 713.

The access control section:

__PACKAGE__-deny_access_unless( /admin/user, [ 'Admin' ] );

fails every time, regardless if the user has the right or not.

The same code works on catalyst 5.7012.  There also does not seam to be
any documentation for using Catalyst  5.80002.

Can any one help in resolving this issue I am facing.

Regards

Gordon




___
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] ACL Error: deny_access_unless

2009-05-23 Thread gordon
Dear List

Has anyone have any issues with:

Catalyst::Plugin::Authorization::ACL  0.11 |
Catalyst::Plugin::Authorization::Roles  0.07

i am adding some access control to my catalyst application.  When I start
up my application I see the following:

Class Catalyst::Dispatcher is calling the deprecated method
Catalyst::Dispatcher::tree,
this will be removed in Catalyst 5.9X at
/usr/local/share/perl/5.8.8/Catalyst/Dispatcher.pm line 713.

The access control section:

__PACKAGE__-deny_access_unless( /admin/user, [ 'Admin' ] );

fails every time, regardless if the user has the right or not.

The same code works on catalyst 5.7012.  There also does not seam to be
any documentation for using Catalyst  5.80002.

Can any one help in resolving this issue I am facing.

Regards

Gordon




___
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] Catalyst error from CPAN

2009-04-27 Thread gordon
Dear List



I have just installed catalyst from CPAN.  I seam to get this error :



Can't call method can without a package or object reference at
/usr/local/share/perl/5.8.8/Catalyst/Plugin/Authentication/Store/DBIC.pm
line 101



This has been working on another system.  Can some one please tell me how
to fix this problem?



Has this problem got any thing to do that I can not use the restart switch
within the server start up?



Regards



Gordon



___
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-13 Thread Gordon Yeong
hmmm
 Haven't done much mochikit but if you're wantign to just update a single
element, consider
using a DIV tag element in the html file and from the javascript file you
have made,
update the element (based on the ID assigned to the DIV tag element earlier)
?


Taking your code into consideration, in your javascript file,
just add this function,


* Start **

function updatepage(str)
{
document.getElementById(price).innerHTML = str;
}

* End **

and where the request is successful, just make a call to it :


* Start **
//Checking to see we have a successful response in our
returned data
if (resp.status == 'Successful')
{
log('the Response has status of successful...');
   log('mokkie Response has status of successful...');
log(resp.data.price);
*updatepage(resp.data.price); Over here :)*
}
else
{
log('Response has status of NON successful');

//calling our partial function
u_message(resp.status);

//getting error reason and txt and updating user
for (i in resp.error)
{
log('Error is:',i);
log('Reason is:',resp.error[i]);
u_error(i+': '+resp.error.i);
}
}

* End **

Hope it helps:)


Regards,
Gordon Yeong


2009/4/13 kakim...@tpg.com.au

 hello, Peter,

  Good evening. Thank you for the response.

 Yeah, log(resp.data.price); prints out the value which  I was expecting.
  Hence,  I was expecting the line, p_txt = P({'style':'display:none'},
 resp.data.price); 
 to have worked.
  alas, your recommendation of p_txt = P({'style':'display:none'},
 resp.data.price.value); failed too :(


  anyone?? thank you:)



 Quoting Peter Flanigan p...@roxsoft.co.uk:

  kakim...@tpg.com.au wrote:
 
   How do I actually get the value (which is the 'price' attribute to
  display)?
   Point of problem: addCallBack method in my javascript file.
 
//Creating a callback on success to process our json response
   d.addCallback
   (
   function (req)
   {
 
   //elements consult mochikit docs for full
  details
   var td_price = TD(null,
  resp.data.price.value);
 
   // Im stuck here!!! Don't know why the freakin' value won't show
  :(
  
   p_txt = P({'style':'display:none'},
  resp.data.price);
   replaceChildNodes(price, [p_txt]);
 
  Am not familiar with Mochikit, but from context should that be
 
  p_txt = P({'style':'display:none'}, resp.data.price.value);
  ^^^
 
  --
 
  Regards
 
  ___
  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] Beginner Question: Controller Layout

2008-12-09 Thread Gordon Yeong
hi, David,

 Good morning.


Recommendation
==

Controllers:

- Musicians (might even breakdown by Music Bands/Duets and soloists). I
know you mentioned about 'Music Bands' but no harm in considering if the
application should have a further breakdown (good for reporting purposes).
- Subscriptions And Products/Plans(if your project is going to earn you
some revenue)
- Attachments (possibly for operations related to your images, music and
other attachments. Operations can be upload, resize, back up and so forth).
- Events ( possibly to manage events)
- Communications ( for your newsletters and possibly other form of
communications)


View:
---
Within the View of each entity (which was made into a controller, ie
Musicians, Subscriptions, Attachments, Events), have role checks to allow
for different groups of users to do things (ie. visitors can browse
information but not edit).

Hope it helps.
2008/12/10 David Schmidt [EMAIL PROTECTED]

 Hello list,

 I am at the point of starting a new project and have yet to choose a
 controller layout.

 my application is a site where:

 music bands can
 -   register
 -   fill out (and later edit) a profile
 -   upload pictures and songs
 -   schedule events which will be displayed on a calendar

 visitors can
 -   browse all of the above information
 -   register to a newsletter

 admins can
 -   edit all of the above stuff

 Well, I suppose you get the picture. I am hoping to get some guidance
 here from someone who has experience

 One solution that comes to my mind would be to make a controlller for
 each role (admin, band, visitor)
 another one would be to make a controller for each type of media
 (songs, pictures, band, ...)

 Either way I am not able to tell which one is most suitable beforehand.

 thanks in advance

 david

 ___
 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] Catalyst using fast CGI

2008-05-22 Thread gordon
Dear List

I am trying to get Catalyst working through apache by using fastcgi.  I am
having difficulty in achieving this.  This problem is that I seam to be
getting apache error code 13.  My config for my website is:

VirtualHost *:80
  ServerName www.dnsemail.co.uk
DocumentRoot /var/www/dnsemail
ErrorLog logs/www.dnsemail.co.uk.error_log
TransferLog logs/www.dnsemail.co.uk.access_log


# Allow CGI script to run
Directory /var/www/dnsemail/script
Options +ExecCGI
/Directory

# Tell Apache this is a FastCGI application
 Alias / /var/www/dnsemail/script/dnsemail_fastcgi.pl/

Files dnsemail_fastcgi.pl
SetHandler fastcgi-script
/Files

Location /
Options ExecCGI
Order allow,deny
Allow from all
AddHandler fcgid-script .pl
/Location
/VirtualHost

I am running it on Fedora Core 6 with Apache 2.  Can someone point me in
the right direction in getting Catalyst framework running under Apache 2.


Regards

Gordon


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