Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Dancer-Plugin-SiteMap CPAN distribution.

Report information
The Basics
Id: 78549
Status: resolved
Priority: 0/
Queue: Dancer-Plugin-SiteMap

People
Owner: Nobody in particular
Requestors: ambs [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.10
Fixed in: (no value)



Subject: Dancer 2 keywords receive a $self object
Hello Now the keywords defined in plugins receive as first argument a reference to an object (the typical $self). Then, register 'sitemap_ignore' => sub { $Dancer::Plugin::SiteMap::OMIT_ROUTES = \@_; }; should be (to be completely correct) register 'sitemap_ignore' => sub { shift if blessed($_[0]) and $_[0]->isa('Dancer::Core::DSL'); $Dancer::Plugin::SiteMap::OMIT_ROUTES = \@_; }; and you need to use Scalar::Util 'blessed'; Note that this should not affect the plugin execution. But it can help other developers to learn how to write dancer 2 compatible modules easier. Cheers
Plugin updated, 0.11 released.