Last active
April 5, 2016 08:37
-
-
Save SysPete/c85c3dcfe89f02cd41139b4cb4aeced4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=head3 Config becomes immutable | |
The plugin's C<config> attribute is loaded lazily on the first call to | |
C<config>. After this first call C<config> becomes immutable so you cannot | |
do the following in a test: | |
use Dancer2; | |
use Dancer2::Plugin::FooBar; | |
set plugins => { | |
FoorBar => { | |
wibble => 1, # this is OK | |
}, | |
}; | |
flibble(45); # plugin keyword called which causes config read | |
set plugins => { | |
FoorBar => { | |
wibble => 0, # this will NOT change plugin config | |
}, | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment