[dancer-users] Dancer2::Session::DBIC
Brendon Oliver
brendon.oliver at gmail.com
Wed Jan 7 08:03:06 GMT 2015
On Wed, 7 Jan 2015 08:27:33 AM Stefan Hornburg wrote:
> > Just messing with this module and discovered that it ignores the
> > data_column value given in the settings.>
> > In _retrieve() - circa line 191:
> > my $session_data = $session_object->session_data;
> >
> > needs to be something like:
> > my $data_column = $self->data_column();
> > my $session_data = $session_object->$data_column();
>
> That is obviously a mistake. Do you mind to prepare a PR to fix it?
PR = problem report? sure, just point me in the right direction.
>
> > Curious too: why doesn't this module use Dancer2::Plugin::DBIC ? I'm
> > already using DBIC elsewhere in my application and it seems silly /
> > redundant to me to have to define the connect string in two different
> > places in the config. Seems to me it'd be far simpler to just have the
> > config nominate which DBIC 'schema' connection to use and simply fall
> > back to 'default' if none is provided.>
> > (as an aside, I'm also working on a DBIC provider for
> > D2::Plugin::Auth::Extensible for the same reason - to reuse the existing
> > DBIC config, but retaining the user-definable table structures as per
> > the Database provider).
> I don't think that this is even possible in Dancer 1, to use plugin in an
> engine. In Dancer 2, you can't use a plugin in another plugin as the plugin
> architecture is broken in this regard.
>
oh ok - since I'm a bit ignorant in that regard, I wasn't aware that it's not
supposed to work. But the DBIC D:P:A:E provider I have does work - and what
you say probably explains a warning message I see when starting the test
server if I set log=core (but I haven't tried to chase that down yet).
>From what you say tho, I think, D2::Session::DBIC isn't a plugin per-se (in
that it doesn't inherit from D2::Plugin)?
> BTW: I also started on a DBIC provider, but gave up for now.
>
> I need some more developers which are interested in fixing the plugin
> architecture, this problem isn't addressed yet :'(
I'd offer to try & help, but don't really have a clue as to what might
required.
- Brendon
More information about the dancer-users
mailing list