[Catalyst] Migrating from Catalyst::Log::Log4perl to Log::Log4perl::Catalyst

2012-04-04 Thread Bill Moseley
This may be more of a log4perl question.

I have a custom plugin I've been using for a very long time that used
Catalyst::Log::log4perl.  It added a few features.

   - added a number of config options to enable logging warns and errors
   via log4perl (trapping __DIE__ and __WARN__).
   - optionally enabling stack traces for messages that match a pattern.
   - provided a config option that listed a filename where to send
   error-level messages (which cron would send out via email every few minutes)
   - allow for downgrading messages - i.e. if a message pattern matched
   it might change it from error to warn.  Useful when something triggers
   a zillion errors or when we really want to see an Apache error about an
   aborted connection every time someone hits escape when loading a page.

How much of this can I do just with configuration and
Log::Log4perl::Catalyst?  I'd prefer to get rid of the plugin.

-- 
Bill Moseley
mose...@hank.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] install_driver(mysql) failed:

2012-04-04 Thread Robyn Jonahs
I installed a DMG of mysql from the mysql site. I am thinking to upgrade
MySQL to the current version and try to deal with the location when I do
that. I will try to locate the install_name. They have tar balls along with
the dmg's so I could try to build it.

Thanks for the help. It is all appreciated since I am not a programmer by
trade.


On Mon, Apr 2, 2012 at 10:29 AM, Daniel J. Luke dl...@geeklair.net wrote:

 On Apr 2, 2012, at 12:22 AM, Robyn Jonahs wrote:
 
  Ok so if I remove the link or leave it, the output from otool -L is
 
 
 /FOO/perl5/perlbrew/perls/perl-5.14.2/lib/site_perl/5.14.2/darwin-2level/auto/DBD/mysql/mysql.bundle:
  libmysqlclient.18.dylib (compatibility version 18.0.0, current
 version 18.0.0)
  /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current
 version 125.2.11)
 
  Which I did, but I did not understand what to do with the info. Any help
 there?

 To me, it looks like the install_name on libmysqlclient.18.dylib is
 incorrect (which would have happened when you built/installed mysql). I
 took a quick look at the Macports port for mysql and didn't see any
 patching to fix that there - so I don't know why your mysql build would
 have an incorrect install_name. Did you build mysql yourself or install a
 binary/package from somewhere?

 The 'correct' fix would be to adjust the install_name on
 libmysqlclient.18.dylib and then rebuild DBD::mysql (there are, of course,
 lots of other ways you could fix it).

  I can also do the fix at the link by setting the path to the file in the
 environment variable
  export DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:/usr/local/mysql/lib/

 There's almost never a time when setting the DYLD_* environment variables
 on Mac OS X is a good idea (and you would want DYLD_FALLBACK_LIBRARY_PATH
 anyway...)

  I don't have an indexer or /usr/local/bin/search files so I don't know
 what to do with the install_name_tool exactly to set the paths. Won't this
 go away if the system gets updated link the symbolic link?

 stuff in /usr/local is stuff you installed so Apple won't touch it with
 updates

  sudo install_name_tool -change libmysqlclient.18.dylib
 /usr/local/mysql/lib/libmysqlclient.18.dylib /usr/local/bin/indexer

 see the manpage for install_name_tool for details on how to use it.

 You could fix just your mysql.bundle, libmysqlclient.18.dylib and
 mysql.bundle, or maybe even just add an rpath to mysql.bundle to get it to
 search /usr/local/mysql/lib

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

___
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] Error loading data from schema

2012-04-04 Thread Kenneth S Mclane
I am getting the following error: Caught exception in 
dbms::Controller::AccountView-list Can't call method all on an 
undefined value at 
/tmp/catalyst/dbms/script/../lib/dbms/Controller/AccountView.pm line 7.

this is the referenced sub:

sub list : Local { 
my ($self, $c) = @_;
$c-stash(accounts = $c-model('dbms::ACCOUNT_VIEW')-all);
$c-stash(template = 'accountview/list.tt2');
}

I have seen quite a few posts about this error but no real explanations of 
what is causing the issue.  I created a view in the DB containing the data 
I need to display on the page.  The error is occurring at this line: 
$c-stash(accounts = $c-model('dbms::ACCOUNT_VIEW')-all); which I have 
tried several different things. If I remove the -all I get no error and 
my header row appears. I cannot find anything that tells me specifically 
what this should be composed of. Any pointers to help figure this out are 
appreciated.

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/


Re: [Catalyst] Error loading data from schema

2012-04-04 Thread Francisco Obispo
The error is because $c-model('dbms::ACCOUNT_VIEW') is not defined.

Did you create the view after creating the model? if so, try re-running the 
create script so it can pick up the changes.

Also, to avoid fatal errors, you should attempt to load the model first, and 
then send to the template a data structure only if it loads properly.



On Apr 4, 2012, at 7:28 AM, Kenneth S Mclane wrote:

 I am getting the following error: Caught exception in 
 dbms::Controller::AccountView-list Can't call method all on an undefined 
 value at /tmp/catalyst/dbms/script/../lib/dbms/Controller/AccountView.pm line 
 7. 
 
 this is the referenced sub: 
 
 sub list : Local { 
 my ($self, $c) = @_; 
 $c-stash(accounts = $c-model('dbms::ACCOUNT_VIEW')-all); 
 $c-stash(template = 'accountview/list.tt2'); 
 } 
 
 I have seen quite a few posts about this error but no real explanations of 
 what is causing the issue.  I created a view in the DB containing the data I 
 need to display on the page.  The error is occurring at this line: 
 $c-stash(accounts = $c-model('dbms::ACCOUNT_VIEW')-all); which I have 
 tried several different things. If I remove the -all I get no error and my 
 header row appears. I cannot find anything that tells me specifically what 
 this should be composed of. Any pointers to help figure this out are 
 appreciated.
 
 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/

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] Error loading data from schema

2012-04-04 Thread Kenneth S Mclane
From:
Francisco Obispo fobi...@isc.org
To:
The elegant MVC web framework catalyst@lists.scsys.co.uk
Date:
04/04/2012 09:47 AM
Subject:
Re: [Catalyst] Error loading data from schema



The error is because $c-model('dbms::ACCOUNT_VIEW') is not defined.

Did you create the view after creating the model? if so, try re-running 
the create script so it can pick up the changes.

Also, to avoid fatal errors, you should attempt to load the model first, 
and then send to the template a data structure only if it loads properly.



On Apr 4, 2012, at 7:28 AM, Kenneth S Mclane wrote:

 I am getting the following error: Caught exception in 
dbms::Controller::AccountView-list Can't call method all on an 
undefined value at 
/tmp/catalyst/dbms/script/../lib/dbms/Controller/AccountView.pm line 7. 
 
 this is the referenced sub: 
 
 sub list : Local { 
 my ($self, $c) = @_; 
 $c-stash(accounts = $c-model('dbms::ACCOUNT_VIEW')-all); 
 $c-stash(template = 'accountview/list.tt2'); 
 } 
 
 I have seen quite a few posts about this error but no real explanations 
of what is causing the issue.  I created a view in the DB containing the 
data I need to display on the page.  The error is occurring at this line: 
$c-stash(accounts = $c-model('dbms::ACCOUNT_VIEW')-all); which I have 
tried several different things. If I remove the -all I get no error and 
my header row appears. I cannot find anything that tells me specifically 
what this should be composed of. Any pointers to help figure this out are 
appreciated.
 
 Regards 
 

Thanks for the quick response. I did create it after but I also re-ran the 
script and it pulled it in. I found my error, I was using the wrong schema 
name, hence the object didn't exist. Now it is giving me Couldn't render 
template accountview/list.tt2: file error - config/main: not found, so I 
need to go track that one down. If I can get this one page working I'll be 
able to create all the pages I need then add auth and CRUD and I'm in 
business.





___
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] Error loading data from schema

2012-04-04 Thread Eden Cardim
 Kenneth == Kenneth S Mclane ksmcl...@us.ibm.com writes:

Kenneth I am getting the following error: Caught exception in
Kenneth dbms::Controller::AccountView-list Can't call method all on
Kenneth an undefined value at
Kenneth /tmp/catalyst/dbms/script/../lib/dbms/Controller/AccountView.pm
Kenneth line 7.

Kenneth this is the referenced sub:

Kenneth sub list : Local { my ($self, $c) = @_; $c-stash(accounts =
Kenneth $c-model('dbms::ACCOUNT_VIEW')-all); $c-stash(template =
Kenneth 'accountview/list.tt2'); }

Kenneth I have seen quite a few posts about this error but no real
Kenneth explanations of what is causing the issue.  I created a view in
Kenneth the DB containing the data I need to display on the page.  The
Kenneth error is occurring at this line: $c-stash(accounts = $c-
Kenneth model('dbms::ACCOUNT_VIEW')-all); which I have tried several
Kenneth different things. If I remove the -all I get no error and my
Kenneth header row appears. I cannot find anything that tells me
Kenneth specifically what this should be composed of. Any pointers to
Kenneth help figure this out are appreciated.

When the app loads, you should get a list of loaded components, please show us
that list.

-- 
  Eden Cardim Need help with your Catalyst or DBIx::Class project?
  Code Monkey http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.Want a managed development or deployment platform?
 http://edencardim.comhttp://www.shadowcat.co.uk/servers/

___
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] Error loading data from schema

2012-04-04 Thread Kenneth S Mclane
From:
Eden Cardim edencar...@gmail.com
To:
The elegant MVC web framework catalyst@lists.scsys.co.uk
Date:
04/04/2012 11:13 AM
Subject:
Re: [Catalyst] Error loading data from schema



 Kenneth == Kenneth S Mclane ksmcl...@us.ibm.com writes:

Kenneth I am getting the following error: Caught exception in
Kenneth dbms::Controller::AccountView-list Can't call method all 
on
Kenneth an undefined value at
Kenneth 
/tmp/catalyst/dbms/script/../lib/dbms/Controller/AccountView.pm
Kenneth line 7.

Kenneth this is the referenced sub:

Kenneth sub list : Local { my ($self, $c) = @_; $c-stash(accounts =
Kenneth $c-model('dbms::ACCOUNT_VIEW')-all); $c-stash(template =
Kenneth 'accountview/list.tt2'); }

Kenneth I have seen quite a few posts about this error but no real
Kenneth explanations of what is causing the issue.  I created a view 
in
Kenneth the DB containing the data I need to display on the page. The
Kenneth error is occurring at this line: $c-stash(accounts = $c-
Kenneth model('dbms::ACCOUNT_VIEW')-all); which I have tried several
Kenneth different things. If I remove the -all I get no error and my
Kenneth header row appears. I cannot find anything that tells me
Kenneth specifically what this should be composed of. Any pointers to
Kenneth help figure this out are appreciated.

When the app loads, you should get a list of loaded components, please 
show us
that list.
 
[debug] Debug messages enabled
[debug] Statistics enabled
[debug] Loaded plugins:
..
| Catalyst::Plugin::ConfigLoader  0.30   |
''

[debug] Loaded dispatcher Catalyst::Dispatcher
[debug] Loaded engine Catalyst::Engine
[debug] Found home /tmp/catalyst/dbms
[debug] Loaded Config /tmp/catalyst/dbms/dbms.conf
[debug] Loaded components:
.-+--.
| Class   | Type  
|
+-+--+
| dbms::Controller::AccountView   | 
instance |
| dbms::Controller::Root  | 
instance |
| dbms::Model::ORANGES| 
instance |
| dbms::Model::ORANGES::Account   | class  
 |
| dbms::Model::ORANGES::AccountView   | class  
 |
| dbms::Model::ORANGES::Alert | class  
 |
| dbms::Model::ORANGES::Assignment| class  
 |
| dbms::Model::ORANGES::Assignments   | class  
 |
| dbms::Model::ORANGES::CfgAssignments| class  
 |
| dbms::Model::ORANGES::Check | class  
 |
| dbms::Model::ORANGES::Compliance| class  
 |
| dbms::Model::ORANGES::Contact   | class  
 |
| dbms::Model::ORANGES::Department| class  
 |
| dbms::Model::ORANGES::File  | class  
 |
| dbms::Model::ORANGES::Fixtime   | class  
 |
| dbms::Model::ORANGES::Frequency | class  
 |
| dbms::Model::ORANGES::Latest| class  
 |
| dbms::Model::ORANGES::Manager   | class  
 |
| dbms::Model::ORANGES::Metrics   | class  
 |
| dbms::Model::ORANGES::Priv  | class  
 |
| dbms::Model::ORANGES::Progress  | class  
 |
| dbms::Model::ORANGES::Report| class  
 |
| dbms::Model::ORANGES::Retention | class  
 |
| dbms::Model::ORANGES::Schedule  | class  
 |
| dbms::Model::ORANGES::Server| class  
 |
| dbms::Model::ORANGES::Status| class  
 |
| dbms::Model::ORANGES::Subsystem | class  
 |
| dbms::Model::ORANGES::Ticket| class  
 |
| dbms::Model::ORANGES::Upload| class  
 |
| dbms::View::HTML| 
instance |
| dbms::View::accountview | 
instance |
'-+--'

[debug] Loaded Private actions:
.--+--+--.
| Private  | Class| Method   |
+--+--+--+
| /default  

Re: [Catalyst] Error loading data from schema

2012-04-04 Thread Eden Cardim

| dbms::Model::ORANGES::AccountView   | class|

Kenneth Strange, I do not see it listed, yet it got created and works
Kenneth when I call the /index.

You probably want $c-model('ORANGES::AccountView');

-- 
  Eden Cardim Need help with your Catalyst or DBIx::Class project?
  Code Monkey http://www.shadowcat.co.uk/catalyst/
 Shadowcat Systems Ltd.Want a managed development or deployment platform?
 http://edencardim.comhttp://www.shadowcat.co.uk/servers/

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