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

Stefan Hornburg (Racke) racke at linuxia.de
Wed Jan 7 09:00:49 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();
> 
> 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).
> 

Another way to prevent redundancy of DBIC connection details is DBIx::Class::Schema::Config.

Regards
	Racke

-- 
Modern Perl, Dancer and eCommerce consulting.


More information about the dancer-users mailing list