On 4 May 2015, at 12:46 pm, Naveed Massjouni <[email protected]> wrote:

> What version of the DBIC plugin are you using? If you are not using the 
> latest, can you upgrade and let me know if you still get the same warning.

Hi Naveed,

I am using 0.0009 which I believe is the latest.  Now that I have put Andy’s 
work around in I only get the DEPRECATED massage on startup, not each time the 
global is used:

DEPRECATED: QTechLib::Plugin calls 'dsl' instead of '$dsl->dsl'. at 
/perf/perl/lib/perl5/Dancer2/Plugin/DBIC.pm line 13.
DEPRECATED: QTechLib::Plugin calls 'dsl' instead of '$dsl->dsl'. at 
/perf/perl/lib/perl5/Dancer2/Plugin/DBIC.pm line 13.
DEPRECATED: QTechLib::Plugin calls 'dsl' instead of '$dsl->dsl'. at 
/perf/perl/lib/perl5/Dancer2/Plugin/DBIC.pm line 13.
DEPRECATED: QTechLib::Plugin calls 'dsl' instead of '$dsl->dsl'. at 
/perf/perl/lib/perl5/Dancer2/Plugin/DBIC.pm line 13.
DEPRECATED: QTechLib::Plugin calls 'dsl' instead of '$dsl->dsl'. at 
/perf/perl/lib/perl5/Dancer2/Plugin/DBIC.pm line 13.
2015/05/04-18:44:16 Starman::Server (type Net::Server::PreFork) starting! 
pid(94405)
Resolved [*]:3004 to [0.0.0.0]:3004, IPv4
Binding to TCP port 3004 on host 0.0.0.0 with IPv4
Setting gid to "1000 1000 10 1000"
Starman: Accepting connections at http://*:3004/

(My plugin gets loaded multiple times as it’s referenced in multiple files 
making up my app.)

And here’s the work around code in my plugin:
my $schema;

on_plugin_import {
    my $dsl = shift;
    # Grab a handle to the Plugin::DBIC schema
    die "No schema method in app. Did you load DBIC::Plugin::DBIC before 
QTechLib::Plugin?" unless $dsl->can('schema');
    $schema = $dsl->schema;
    $dsl->debug( "**** Got Schema **** ");
};

Let me know if you need more info.  Thanks for the plugin!

Cheers,
Matt

_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users

Reply via email to