[dancer-users] Dancer2::Session::DBIC

Stefan Hornburg (Racke) racke at linuxia.de
Wed Jan 7 07:27:33 GMT 2015


On 01/07/2015 02:25 AM, Brendon Oliver wrote:
> Hi all,
> 
> 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?

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

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 :'(

Cheers
	Racke



-- 
Modern Perl, Dancer and eCommerce consulting.


More information about the dancer-users mailing list