Subject: | No DB settings for database |
Date: | Thu, 9 Jun 2016 19:55:52 +0000 |
To: | "bug-Dancer2-Plugin-Auth-YARBAC [...] rt.cpan.org" <bug-Dancer2-Plugin-Auth-YARBAC [...] rt.cpan.org> |
From: | "Daniel Jones -X (danjone3 - INSIGHT GLOBAL INC at Cisco)" <danjone3 [...] cisco.com> |
I have been using YARBAC for several months and it stopped working a couple of days ago after I installed Dancer2::Serializer::JSON on my testing machine. Attempting to login or use any other YARBAC function gives a 500 error "Can't call method "quick_select" on an undefined value at /usr/local/share/perl/5.14.2/Dancer2/Plugin/Auth/YARBAC/Provider/Database.pm line 108." Troubleshooting shows that $self->db is undefined. I copied the entire site directory from the production server (which works correctly) to the testing server and the testing server continued to fail. Diffing the Dancer2 directory trees on both machines shows the following:
diff -r Dancer2rm/CLI/Command/gen.pm Dancer2/CLI/Command/gen.pm
3c3
< $Dancer2::CLI::Command::gen::VERSION = '0.200000';
---
Show quoted text
> $Dancer2::CLI::Command::gen::VERSION = '0.166001';
16c16
diff -r Dancer2rm/Plugin/Database.pm Dancer2/Plugin/Database.pm
18c18
< our $VERSION = '2.16';
---
Show quoted text> our $VERSION = '2.15';
Copying the older version of Dancer2.pm and Dancer2/ module subdirectory from the production machine to the testing machine restored functionality on the testing machine. So it appears as though YARBAC is incompatible with the latest version of Dancer2, and installing the JSON serializer via CPAN caused CPAN to update the versions on my testing machine.