Re: [Catalyst] Installing Catalyst::Authentication::Store::DBIx::Class Breaks Catalyst

2009-04-08 Thread Collin Condray
Tomas,

Here's the config section of the debug output:

do {
  my $a = {
"Action::RenderView" => {
  ignore_classes => [
  "DBIx::Class::ResultSource::Table",
  "DBIx::Class::ResultSourceHandle",
  "DateTime",
],
  scrubber_func  => sub { "???" },
},
"Plugin::Authentication" => {
  default_realm => "dbic",
  realms => {
dbic => {
  credential => {
class => "Password",
password_field => "password",
password_hash_type => "SHA-1",
password_type => "hashed",
  },
  store => {
class => "DBIx::Class",
"ignore_fields_in_find" => [],
role_field => "role",
role_relation => "roles",
store_user_class =>
"Catalyst::Authentication::Store::DBIx::Class::User",
user_class => "myappDB::Users",
  },
  use_session => 1,
},
  },
  use_session => 1,
},
"Plugin::ConfigLoader" => {},
authentication => 'fix',
"custom-error-messsage" => { "error-template" => "internal_error.tt",
"view-name" => "TToolkit" },
email => ["Sendmail"],
home => "/home/.avis/username/domainname.com/myapp",
name => "myapp",
require_ssl => { no_cache => 0, remain_in_ssl => 1 },
root => bless({
  dirs => [
"",
"home",
".avis",
"username",
"domainname.com",
"myapp",
"root",
  ],
  file_spec_class => undef,
  volume => "",
}, "Path::Class::Dir"),
session => {
  cookie_name=> "myapp_session",
  expires=> 7200,
  storage=> "/tmp/myapp/session_data",
  verify_address => 0,
},
stacktrace => { context => 3, verbose => 0 },
static => {
  debug => 1,
  dirs => [],
  ignore_dirs => [],
  ignore_extensions => ["tmpl", "tt", "tt2", "html", "xhtml"],
  include_path => ['fix'],
  mime_types => {},
  mime_types_obj => bless({}, "MIME::Types"),
  no_logs => 1,
},
test_mode => 1,
  };
  $a->{authentication} = $a->{"Plugin::Authentication"};
  $a->{static}{include_path}[0] = $a->{root};
  $a;
}

So it looks like the Authentication plugin is loading and the default_realm
is dbic. Should I also be seeing something about the other
authentication/authorization plugins (i.e. Authorization::Roles,
Authorization::ACL)?

Once again I appreciate the help!

Collin Condray
condray.net


On Wed, Apr 8, 2009 at 7:26 AM, Tomas Doran  wrote:

> Collin Condray wrote:
>
>> As J. has requested here are the relevant parts of my configuration files:
>>
>
> 'Session::Store::FastMmap',
>>
>
> I'd be prepared to bet that the issue with C3 was related to an old version
> of this plugin. Upgrading this will have solved your issue, not DBIC or
> Class::C3(::XS)?
>
>
>> name myapp
>> 
>>default_realm dbic
>>
>>
>>
>>
> 
>
>>
>>
>># Use DBIC to retrieve username, password & role
>> information
>>class DBIx::Class
>>
> 
>
>>
>>
>>
>> 
>>
>> The error message that is now showing up in my logs is: "No Store
>> specified for realm "dbic", using the Null store."
>>
>
> Hmm, this all looka correct to my eyes, however Catalyst seemingly isn't
> seeing that config correctly.
>
>
>> Thanks again for the responses. Again, please let me know if there's any
>> other information I can provide.
>>
>
> If you start your app in debug mode, and append ?dump_info=1 to a request,
> then paste the 'config' part of the debug screen, that'll give us what
> Catalyst has actually loaded as the config - I guess that'll be different to
> what you _think_ Catalyst is loading as your config from your config file..
>
> 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] Application stallling problem

2009-04-08 Thread Bruce McKenzie

I do not have this problem. I use _server.pl exclusively.

Have you considered testing via curl? It's pretty effective. I wrote a  
small wrapper around it because the options get annoying.


B.

On Apr 8, 2009, at 6:14 PM, kakim...@tpg.com.au wrote:



hello

good morning. The page which I access at first doesn't require any
database request. It's just pretty much a page that's generated by
template toolkit and that's it.

On the terminal which I am running the myapp_server.pl script, it  
seems

to stall and not do anything when i put in another url path into the
webbrowser and hit enter.

Example:


1) URL, www.lginsurance.com/signup is accessed
2) URL, www.lginsurance.com/signup is accessed again by highlighting  
the

url on the web browser and hitting "enter"
--> notice that on the terminal screen, the last line is " HTML- 
>process

" along with the time taken and stalls there

Is this a problem you guys have?



for production deployment, do many of you run myapp_server.pl or
myapp_fastcgi.pl?

Any comments please?


thank you


K. akimoto





Quoting Tomas Doran :


kakim...@tpg.com.au wrote:

sorry, guys, some bad character encodings from my mail client.
Here's the mail again:



Any ideas??


Not sure, but I think its something between the server you're using
and
the browser - if you're getting the request table, then as far as the

Catalyst server is aware, then it has passed a page to your browser,
and
your browser hasn't requested another one..

Probably trying to use tcpdump or a capturing proxy (parosproxy.org)
to
try and take apart the requests/responses to work out whats going on

would be helpful?

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/


---
Bruce McKenzie
bru...@dynamicrange.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] Application stallling problem

2009-04-08 Thread kakimoto
Hello, Kieren,

  thank you for your feedback.

1) CGI Template Toolkit plugin - not using it

I do not think that I am using the CGI Template Toolkit plugin.
I have only been using Template Toolkit as prescribed in the Catalyst
tutorials.

in my file, /myAppl/lib/myApp/View/HTML.pm, I have the line,
 "TEMPLATE_EXTENSION => '.tt2'"


May I ask on what sort of CGI Template Toolkit plugin are you referring
to specifically?


2) Currently having my own ubuntu virtual server to deploy my application.


  - Any good recommendations?
   - Would using myapp_server.pl cut for an application which has say 50
users logged in at the same time?

Please pardon my lack of knowledge for I am only a developer and have
little experience in the systems administation and tuning sector.

Thank you, all.





Quoting Kieren Diment :

> Are you using the CGI Template Toolkit plugin thingy?  Don't.  This 
> 
> will cause your problem as described.  If not you've given us  
> insufficient information
> 
> Fastcgi is easier to setup on shared hosting, and has some  
> advantages.  CATALYST_ENGINE=HTTP::Prefork script/myapp_server.pl is 
> 
> pretty simple and can be reverse proxied pretty easily.  Install  
> C::E::HTTP::Prefork from CPAN and give it a shot...
> 
> On 09/04/2009, at 11:14 AM, kakim...@tpg.com.au wrote:
> 
> >
> > hello
> >
> > good morning. The page which I access at first doesn't require any
> > database request. It's just pretty much a page that's generated by
> > template toolkit and that's it.
> >
> > On the terminal which I am running the myapp_server.pl script, it 
> 
> > seems
> > to stall and not do anything when i put in another url path into
> the
> > webbrowser and hit enter.
> >
> > Example:
> >
> >
> > 1) URL, www.lginsurance.com/signup is accessed
> > 2) URL, www.lginsurance.com/signup is accessed again by
> highlighting  
> > the
> > url on the web browser and hitting "enter"
> > --> notice that on the terminal screen, the last line is " HTML- 
> > >process
> > " along with the time taken and stalls there
> >
> > Is this a problem you guys have?
> >
> >
> >
> > for production deployment, do many of you run myapp_server.pl or
> > myapp_fastcgi.pl?
> >
> > Any comments please?
> >
> >
> > thank you
> >
> >
> > K. akimoto
> >
> >
> >

___
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::Controller::REST + use Catalyst qw/Server Server::XMLRPC/ = Error

2009-04-08 Thread J. Shirley
On Thu, Apr 9, 2009 at 10:00 AM, Bruce McKenzie wrote:

> I have a newly developed RESTful interface to an existing server using
> C::C::REST. Works nicely -- Catalyst is a very nice tool, and the REST
> extensions are very helpful.
> The server has existing services that are orthogonal to the RESTful
> interface. I don't really wish to RESTify them so I'd like to expose them as
> XML-RPC.
>
> Per the tutorial (
> http://search.cpan.org/~michiel/Catalyst-Plugin-Server-0.24/lib/Catalyst/Plugin/Server/XMLRPC/Tutorial.pod
>  )
> I added "Server Serve::XMLRPC" to my "use Catalyst" line.
>
> I now receive this:
> ---
> RestRPC has a custom request class Catalyst::Plugin::Server::Request, which
> is not a Catalyst::Request::REST; see Catalyst::Request::REST at
> /Library/Perl/5.8.8/Catalyst/Request/REST.pm line 29.
> Compilation failed in require at script/restrpc_server.pl line 55.
> ---
>
> I see this in the REST doc:
> ---
> Note that if you have a custom request class in your application, and it
> does
> not inherit from C, your application will fail
> with an
> error indicating a conflict the first time it tries to use
> C's functionality.  To fix this error, make sure
> your
> custom request class inherits from C.
> ---
> but that doesn't seems like an option here. (These are peers, not
> parent/child classes)
>
> Am I missing something obvious?
>
> Is there another way to do XML-RPC + REST?
>
> Seems like I could just handle the POSTs with non-ActionClass('REST')
> methods -- but then it becomes "not quite XML-RPC".
>
> Thanks,
>
> Bruce
>
> ---
> Bruce McKenzie
> bru...@dynamicrange.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/
>
>

Well, the problem is the two request classes are just fighting and the
Plugin clobbers it first.  The easy solution that I can think of would be to
create a custom request class that looks like:

package MyApp::Request::XMLRPCwithREST;

use strict;
use warnings;

use base qw/Catalyst::Request::REST Class::Accessor::Fast/;

*params = *parameters;

sub register_server {
my ($self, $name, $class) = @_;
return unless ($name && $class);

$self->mk_accessors($name);
$self->$name($class);
}

Then, after that you just modify the plugins ReqClass to point to yours (in
MyApp.pm):

$Catalyst::Plugin::Server::ReqClass = 'MyApp::Request::XMLRpcwithREST';

This is all just a speculative solution, but I believe it would work for
you.  You're definitely in edge-case territory though.

-J
___
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::Controller::REST + use Catalyst qw/Server Server::XMLRPC/ = Error

2009-04-08 Thread Hans Dieter Pearcey
On Wed, Apr 08, 2009 at 06:00:36PM -0700, Bruce McKenzie wrote:
> Note that if you have a custom request class in your application, and it does
> not inherit from C, your application will fail with 
> an
> error indicating a conflict the first time it tries to use
> C's functionality.  To fix this error, make sure your
> custom request class inherits from C.
> ---
> but that doesn't seems like an option here. (These are peers, not parent/child
> classes)
> 
> Am I missing something obvious?

Doesn't this suck?  It should clearly be a request role instead of a request
class.

Seriously, I plan to fix this very soon, and I'm sorry it's still biting you.

hdp.

___
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] Application stallling problem

2009-04-08 Thread Kieren Diment
Are you using the CGI Template Toolkit plugin thingy?  Don't.  This  
will cause your problem as described.  If not you've given us  
insufficient information


Fastcgi is easier to setup on shared hosting, and has some  
advantages.  CATALYST_ENGINE=HTTP::Prefork script/myapp_server.pl is  
pretty simple and can be reverse proxied pretty easily.  Install  
C::E::HTTP::Prefork from CPAN and give it a shot...


On 09/04/2009, at 11:14 AM, kakim...@tpg.com.au wrote:



hello

good morning. The page which I access at first doesn't require any
database request. It's just pretty much a page that's generated by
template toolkit and that's it.

On the terminal which I am running the myapp_server.pl script, it  
seems

to stall and not do anything when i put in another url path into the
webbrowser and hit enter.

Example:


1) URL, www.lginsurance.com/signup is accessed
2) URL, www.lginsurance.com/signup is accessed again by highlighting  
the

url on the web browser and hitting "enter"
--> notice that on the terminal screen, the last line is " HTML- 
>process

" along with the time taken and stalls there

Is this a problem you guys have?



for production deployment, do many of you run myapp_server.pl or
myapp_fastcgi.pl?

Any comments please?


thank you


K. akimoto





Quoting Tomas Doran :


kakim...@tpg.com.au wrote:

sorry, guys, some bad character encodings from my mail client.
Here's the mail again:



Any ideas??


Not sure, but I think its something between the server you're using
and
the browser - if you're getting the request table, then as far as the

Catalyst server is aware, then it has passed a page to your browser,
and
your browser hasn't requested another one..

Probably trying to use tcpdump or a capturing proxy (parosproxy.org)
to
try and take apart the requests/responses to work out whats going on

would be helpful?

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/



___
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] Application stallling problem

2009-04-08 Thread kakimoto

hello

 good morning. The page which I access at first doesn't require any
database request. It's just pretty much a page that's generated by
template toolkit and that's it.

On the terminal which I am running the myapp_server.pl script, it seems
to stall and not do anything when i put in another url path into the
webbrowser and hit enter.

Example:


1) URL, www.lginsurance.com/signup is accessed
2) URL, www.lginsurance.com/signup is accessed again by highlighting the
url on the web browser and hitting "enter"
--> notice that on the terminal screen, the last line is " HTML->process
" along with the time taken and stalls there

Is this a problem you guys have?



for production deployment, do many of you run myapp_server.pl or
myapp_fastcgi.pl?

Any comments please?


thank you


K. akimoto





Quoting Tomas Doran :

> kakim...@tpg.com.au wrote:
> > sorry, guys, some bad character encodings from my mail client.
> > Here's the mail again:
> 
> > Any ideas??
> 
> Not sure, but I think its something between the server you're using
> and 
> the browser - if you're getting the request table, then as far as the
> 
> Catalyst server is aware, then it has passed a page to your browser,
> and 
> your browser hasn't requested another one..
> 
> Probably trying to use tcpdump or a capturing proxy (parosproxy.org)
> to 
> try and take apart the requests/responses to work out whats going on
> 
> would be helpful?
> 
> 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/


[Catalyst] Catalyst::Controller::REST + use Catalyst qw/Server Server::XMLRPC/ = Error

2009-04-08 Thread Bruce McKenzie
I have a newly developed RESTful interface to an existing server using  
C::C::REST. Works nicely -- Catalyst is a very nice tool, and the REST  
extensions are very helpful.


The server has existing services that are orthogonal to the RESTful  
interface. I don't really wish to RESTify them so I'd like to expose  
them as XML-RPC.


Per the tutorial (http://search.cpan.org/~michiel/Catalyst-Plugin-Server-0.24/lib/Catalyst/Plugin/Server/XMLRPC/Tutorial.pod 
 ) I added "Server Serve::XMLRPC" to my "use Catalyst" line.


I now receive this:
---
RestRPC has a custom request class Catalyst::Plugin::Server::Request,  
which is not a Catalyst::Request::REST; see Catalyst::Request::REST  
at /Library/Perl/5.8.8/Catalyst/Request/REST.pm line 29.

Compilation failed in require at script/restrpc_server.pl line 55.
---

I see this in the REST doc:
---
Note that if you have a custom request class in your application, and  
it does
not inherit from C, your application will  
fail with an

error indicating a conflict the first time it tries to use
C's functionality.  To fix this error, make  
sure your

custom request class inherits from C.
---
but that doesn't seems like an option here. (These are peers, not  
parent/child classes)


Am I missing something obvious?

Is there another way to do XML-RPC + REST?

Seems like I could just handle the POSTs with non-ActionClass('REST')  
methods -- but then it becomes "not quite XML-RPC".


Thanks,

Bruce

---
Bruce McKenzie
bru...@dynamicrange.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/


[Catalyst] ModPerl::Registry

2009-04-08 Thread Octavian Râşniţă

Hi,

I know that if possible the mod_perl handlers are recommended and not 
ModPerl::PerlRun and neither ModPerl::Registry, but these options could be 
used to run Catalyst applications in less privileged servers because the 
server doesn't need to be restarted in order to start the application.


I read C::Engine::Apache2::MP20's POD documentation saying that:

   While this method is not recommended, you can also run your Catalyst
   application via a ModPerl::Registry script.

   httpd.conf:

   PerlModule ModPerl::Registry
   Alias / /var/www/MyApp/script/myapp_registry.pl/

   
   Options +ExecCGI
   

   
   SetHandler  perl-script
   PerlResponseHandler ModPerl::Registry
   

   script/myapp_registry.pl (you will need to create this):

   #!/usr/bin/perl

   use strict;
   use warnings;
   use MyApp;

   MyApp->handle_request( Apache2::RequestUtil->request );

Does anyone know why this method is not recommended? Shouldn't it work?

I've tried it and the applications run well the main page (the / URI) but if 
I create another controller and try to access it, it gives a 404 Not Found 
error.


I tried with a pre-made app and with a new MyApp.pm with the same results.

Thanks.

Octavian


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


Re: [Catalyst] Issue with Catalyst:Can't locate object method "get_user" via package "Catalyst::Plugin::Authentication::Store::DBIC"

2009-04-08 Thread Tomas Doran

kakim...@tpg.com.au wrote:

When was
"http://search.cpan.org/~hkclark/Catalyst-Manual-5.7020/lib/Catalyst/Manual/Tutorial/Authentication.pod";
updated?

Does it reflect the latest modules?

Please revert.


Yes, the latest documentation reflects the latest code.

And I don't see any reason to revert it - the authentication changeover 
happened mid 2007 (and was clearly documented in the authentication 
module), and there is still backwards compatibility.


What are you actually asking for here / how do you think we can improve 
the documentation to make things more clear?


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] Installing Catalyst::Authentication::Store::DBIx::Class Breaks Catalyst

2009-04-08 Thread Tomas Doran

Collin Condray wrote:

As J. has requested here are the relevant parts of my configuration files:



'Session::Store::FastMmap',


I'd be prepared to bet that the issue with C3 was related to an old 
version of this plugin. Upgrading this will have solved your issue, not 
DBIC or Class::C3(::XS)?




name myapp

default_realm dbic








# Use DBIC to retrieve username, password & role information
class DBIx::Class








The error message that is now showing up in my logs is: "No Store 
specified for realm "dbic", using the Null store."


Hmm, this all looka correct to my eyes, however Catalyst seemingly isn't 
seeing that config correctly.




Thanks again for the responses. Again, please let me know if there's any 
other information I can provide.


If you start your app in debug mode, and append ?dump_info=1 to a 
request, then paste the 'config' part of the debug screen, that'll give 
us what Catalyst has actually loaded as the config - I guess that'll be 
different to what you _think_ Catalyst is loading as your config from 
your config file..


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/


[Catalyst] Installing Catalyst::Authentication::Store::DBIx::Class Breaks Catalyst

2009-04-08 Thread Collin Condray
Thanks everyone for their quick responses to my issue. Between upgrading to
the latest version of Catalyst and commenting out all references to the
Authentication module I can get the vast majority of the site's
functionality working which is good enough for my immediate purposes. I've
also updated DBIx::Class, Class::C3 and
Class::C3::XS as suggested. So now, my issue is no longer urgent just
puzzling.

As J. has requested here are the relevant parts of my configuration files:

myapp.pm

use Catalyst (
#'-Debug',
'ConfigLoader',
'Static::Simple',
'StackTrace',
'Session',
'Session::Store::FastMmap',
'Session::State::Cookie',
'Authentication',

'Authorization::Roles',
'Authorization::ACL',

'RequireSSL',
'Email',
'CustomErrorMessage',

our $VERSION = '0.01';

__PACKAGE__->config( name => 'myapp' );

# Start the application
__PACKAGE__->setup;

# Authorization::ACL Rules
__PACKAGE__->deny_access_unless( "/admin", [qw/admin/], );

and myapp.conf

name myapp

default_realm dbic



# Note this first definition would be the same as setting
# __PACKAGE__->config->{authentication}->{realms}->{dbic}
# ->{credential} = 'Password' in lib/myapp.pm
#
# Specify that we are going to do password-based auth
class Password
# This is the name of the field in the users table with the
# password stored in it
password_field password
# Switch to more secure hashed passwords
#password_type clear
password_type  hashed
# Use the SHA-1 hashing algorithm
password_hash_type SHA-1


# Use DBIC to retrieve username, password & role information
class DBIx::Class
# This is the model object created by Catalyst::Model::DBIC
# from your schema (you created 'myapp::Schema::User' but as
# the Catalyst startup debug messages show, it was loaded as
# 'myapp::Model::DB::Users').
# NOTE: Omit 'myapp::Model' here just as you would when
using
# '$c->model("DB::Users)'
user_class myappDB::Users
# This is the name of a many_to_many relation in the users
# object that points to the roles for that user
role_relation  roles
# This is the name of field in the roles table that contains
# the role information
role_field role





The main exception to the tutorial method is that I'm using an email address
as the user name rather than a username field.

The error message that is now showing up in my logs is: "No Store specified
for realm "dbic", using the Null store."

Thanks again for the responses. Again, please let me know if there's any
other information I can provide.

Collin Condray
condray.net
___
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] Installing Catalyst::Authentication::Store::DBIx::Class Breaks Catalyst

2009-04-08 Thread Tomas Doran

Collin Condray wrote:
This completely rendered my site totally unusable. Now I am receiving 
the error:
Inconsistent hierarchy during C3 merge of class 'myAPP': merging failed 
on parent 'Class::Accessor::Fast' at 
/home/username/local/lib/perl/5.8.4/Class/C3/XS.pm line 56., referer: 
https://www.mysite.com/


I have been unable to find anything that I've been able to understand on 
the cause of this problem. Has anyone else come across this error 
message and if so, has anyone found a solution to it.


Yes.

If you remove /home/username/local/lib/perl/5.8.4/Class/C3/XS.pm then 
you'll get a better / more helpful error message.


The (brief) explanation is that somehow, your application is composed of 
base classes which cannot be resolved into a linear order.


Example:

package BaseLeft;
our $VERSION = 0.1;

package BaseRight;
our $VERSION = 0.1;

package A;
use base qw/BaseLeft BaseRight/;

package B;
use base qw/BaseRight BaseLeft/;

package CrashAndBurn;
use base qw/A B/;

Now, using Algorithm::C3, try to resolve a method call in 
CrashAndBurn... Answer - you can't!!! It doesn't make sense..


Which means that C3 resolution is going to explode, just as you're 
seeing. You should be able to look at the 'use base' lines in your 
plugins, and work out if you have this situation. Most often, its caused 
by code which says use base qw/Class::Data::Inheritable 
Class::Accessor::Fast/ (as everything else does it the other way round.


The most common plugin causing this is 
Catalyst::Plugin::Session::Store::FastMMap <= version 0.03. So if you're 
using that, upgrade, and it should fix your issues!


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/