[cgiapp] Authentication cant find my driver
Hello, Really stuck here I'm trying to create a new driver for CAP::Authentication. When I run my program, it says: --- snip -- Error executing class callback in prerun stage: Driver MULTI_DBI can not be found at /usr/lib/perl5/site_perl/5.10.0/CGI/Application/Plugin/Authentication.pm line 1096. - endsnip --- I put my driver ( MULTI_DBI.pm ) in the same directory as the existing drivers. It has the same ownership and permissions as the existing drivers. It has the same structure as the existing drivers, with the exception that instead of subclassing Driver, it subclasses Driver::DBI. I tried to change it to subclassing Driver instead, but no luck. I changed MULTI_DBI to MULTIDBI on the off chance that it didn't like the underscore, no luck. Grepping around, I can't find any list of drivers in Authentication.pm or Driver.pm. Is there some giant perl-wide list ( besides @INC ) of all the files that are available to require()? - Jerry Kaidor # CGI::Application community mailing list #### ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp## #### ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## ####
Re: [cgiapp] Authentication cant find my driver
On Sat, Jun 19, 2010 at 12:51 AM, Jerry Kaidor je...@tr2.com wrote: I'm trying to create a new driver for CAP::Authentication. When I run my program, it says: --- snip -- Error executing class callback in prerun stage: Driver MULTI_DBI can not be found at /usr/lib/perl5/site_perl/5.10.0/CGI/Application/Plugin/Authentication.pm line 1096. - endsnip --- I put my driver ( MULTI_DBI.pm ) in the same directory as the existing drivers. It has the same ownership and permissions as the existing drivers. What does your 'package' line at the top of your module look like? It should be: package CGI::Application::Plugin::Authentication::Driver::MULTI_DBI; Cheers, Cees # CGI::Application community mailing list #### ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp## #### ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## ####
Re: [cgiapp] Authentication cant find my driver
And just for yuks, I said: require '/usr/lib/perl5/site_perl/5.10.0/CGI/Application/Plugin/Authentication/Driver/DBI.pm' ...at the top of my application and it found it. Then I changed it to require '/usr/lib/perl5/site_perl/5.10.0/CGI/Application/Plugin/Authentication/Driver/MULTIDBI.pm' and it DIDN'T find it. So apparently there IS some sort of Perl system-wide list of files and packages besides @INC. Can't be @INC because my file is in the same directory. Right? - Jerry Kaidor Hello, Really stuck here I'm trying to create a new driver for CAP::Authentication. When I run my program, it says: --- snip -- Error executing class callback in prerun stage: Driver MULTI_DBI can not be found at /usr/lib/perl5/site_perl/5.10.0/CGI/Application/Plugin/Authentication.pm line 1096. - endsnip --- I put my driver ( MULTI_DBI.pm ) in the same directory as the existing drivers. It has the same ownership and permissions as the existing drivers. It has the same structure as the existing drivers, with the exception that instead of subclassing Driver, it subclasses Driver::DBI. I tried to change it to subclassing Driver instead, but no luck. I changed MULTI_DBI to MULTIDBI on the off chance that it didn't like the underscore, no luck. Grepping around, I can't find any list of drivers in Authentication.pm or Driver.pm. Is there some giant perl-wide list ( besides @INC ) of all the files that are available to require()? - Jerry Kaidor # CGI::Application community mailing list #### ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp## #### ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## #### # CGI::Application community mailing list #### ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp## #### ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## ####
Re: [cgiapp] Authentication cant find my driver
What does your 'package' line at the top of your module look like? It should be: package CGI::Application::Plugin::Authentication::Driver::MULTI_DBI; *** Yes, it is exactly that. - Jerry # CGI::Application community mailing list #### ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp## #### ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## ####
Re: [cgiapp] Authentication cant find my driver
Hi Jerry On Fri, 2010-06-18 at 08:14 -0700, Jerry Kaidor wrote: And just for yuks, I said: require '/usr/lib/perl5/site_perl/5.10.0/CGI/Application/Plugin/Authentication/Driver/DBI.pm' ...at the top of my application and it found it. Then I changed it to require '/usr/lib/perl5/site_perl/5.10.0/CGI/Application/Plugin/Authentication/Driver/MULTIDBI.pm' and it DIDN'T find it. Correct. The '_' is missing from MULTI_DBI. So apparently there IS some sort of Perl system-wide list of files and packages besides @INC. Can't be @INC because my file is in the same directory. Right? I don't think that's the problem... -- Ron Savage http://savage.net.au/ Ph: 0421 920 622 # CGI::Application community mailing list #### ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp## #### ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## ####
Re: [cgiapp] Authentication cant find my driver
Hi Jerry Correct. The '_' is missing from MULTI_DBI. *** Yes, I was back and forth on that underscore. I just put it back in, because it didn't make any difference. So apparently there IS some sort of Perl system-wide list I don't think that's the problem... *** I don't think so, either. I tried the following experiment: 1. Saved MULTI_DBI.pm somewhere else. 2. Copied DBI.pm to MULTI_DBI.pm Then it worked! Well, didn't really work, because DBI.pm doesn't have to code to do what I wanted. But it got past the can't find the driver error. I think that there is a subtlety in this line of MULTI_DBI.pm: --- snip use base qw(CGI::Application::Plugin::Authentication::Driver::DBI); --- endsnip Either it is not finding the DBI driver, or the DBI driver is unable to find something that IT needs. I've seen similar before in other systems: file A needs library B, it can't find it, and the system complains that it can't find file A, even though it's right in front of your face. I had to leave it for now and get some real work done for my business. - Jerry Kaidor -- Ron Savage http://savage.net.au/ Ph: 0421 920 622 # CGI::Application community mailing list #### ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp## #### ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## #### # CGI::Application community mailing list #### ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp## #### ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## ####