[dancer-users] Testing D2 Plugins calling plugin_setting

Henk van Oers hvo.pm at xs4all.nl
Mon Nov 24 07:30:36 GMT 2014


I was hoping to get it working with only a small number of changes
from de D1 version, but I now understand that's not posible.

We can't talk with the late James Aitken about this
and since I have to rewrite
Dancer::Plugin::Auth::Extensible::Provider::Usergroup
anyway, yes, let's change the API.

Thanks!
-- 
Henk
(See you tomorrow at AmsterdamX.pm)

On Sun, 23 Nov 2014, Sawyer X wrote:

> Hi Henk!
> I haven't replied for a while because I have been sitting and working on the plugin.
> 
> The main problem was the overload. It was screwing up stuff. It took a while to find.
> 
> Another problem is the awkward API here, which I think needs to be changed. It's an object but not an object. It has overloading
> but registers keywords. It has a few mutable options and some places in which they are immutable.
> 
> Because it's still not 100% working (because of this API I don't have the time to wrangle into proper behavior), I haven't
> submitted a pull request for all the fixes so far.
> 
> I'm willing to rework the API and make it consistent, resolving the issues and providing a full pull request, but I won't do it
> unless I know you're okay with it.
> 
> 
> On Sun, Nov 23, 2014 at 1:39 PM, Henk van Oers <henk at signature.nl> wrote:
>
>       Good morning Sawyer,
>
>       The repo: https://github.com/hvoers/Dancer2-Plugin-Passphrase
>
>       Thanks for taking a look.
>
>       Henk.
>
>       --
> 
>
>       On Sun, 23 Nov 2014, Sawyer X wrote:
>
>             I meant the repo.
>             I just woke up, give me a break. :)
>
>             On Sun, Nov 23, 2014 at 1:03 PM, Kov?cs D?vid [ Davs ] <davserer at gmail.com> wrote:
>                   https://metacpan.org/pod/Dancer2::Plugin::Passphrase Is this it?
>
>             On Sun, Nov 23, 2014 at 1:00 PM, Sawyer X <xsawyerx at gmail.com> wrote:
>                   This is because you're calling plugin_setting() in the wrong context.
>             Where is the code? :)
>
>             On Sun, Nov 23, 2014 at 11:00 AM, Henk van Oers <hvo.pm at xs4all.nl> wrote:
>
>                   In Dancer2-Plugin-Passphrase I have this test:
>
>                   --- 003_default_settings.t ---
>                   use Test::More tests => 3;
>
>                   use strict;
>                   use warnings;
>
>                   use Dancer2;
>                   use Dancer2::Plugin::Passphrase;
>
>                   my $secret = "Super Secret Squirrel";
>
>                   my $rfc2307 = passphrase($secret)->generate->rfc2307;
>
>                   like($rfc2307, qr/^{CRYPT}\$2a\$04\$/,      'RFC compliant hash generated');
>                   ok(passphrase($secret)->matches($rfc2307),  'Match plaintext to hash');
>                   ok(!passphrase('WRONG')->matches($rfc2307), 'Incorrect passwords should be rejected');
>
>                   --- ---
>
>                   CPANtesters use the latest D2,
>                   which contains a "croak 'No DSL object found'"
>
>                   See:
>                   http://www.cpantesters.org/cpan/report/d4473e02-7246-11e4-ac74-95bbe0bfc7aa
>
>                   How do I add a DSL to this test?
>
>                   Thanks,
>                   Henk
> 
> _______________________________________________
> dancer-users mailing list
> dancer-users at dancer.pm
> http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
> 
> 
> 
>


More information about the dancer-users mailing list