-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
106 additions
and
25 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"abstract" : "Store value constraints for Data::Checks, Type::Tiny, Moose and so on.", | ||
"abstract" : "Store constraints for Data::Checks, Type::Tiny, Moose and so on.", | ||
"author" : [ | ||
"kobaken <[email protected]>" | ||
], | ||
|
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
use Test2::V0; | ||
use Test2::Require::Module 'Exporter::Tiny', '1.006002'; | ||
use Test2::Require::Module 'Type::Tiny', '2.000000'; | ||
|
||
use lib 't/10-integration/Exporter-Tiny'; | ||
|
||
subtest 'Test `kura` with Exporter::Tiny' => sub { | ||
use mykura Foo => sub { $_ eq 'foo' }; | ||
|
||
isa_ok __PACKAGE__, 'Exporter::Tiny'; | ||
|
||
ok !Foo->check(''); | ||
ok Foo->check('foo'); | ||
}; | ||
|
||
done_testing; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package mykura; | ||
use strict; | ||
use warnings; | ||
|
||
use kura (); | ||
|
||
sub import { | ||
my $pkg = shift; | ||
my $caller = caller; | ||
|
||
local $kura::EXPORTER_CLASS = 'Exporter::Tiny'; | ||
kura->import_into($caller, @_); | ||
} | ||
|
||
1; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
package MyFoo; | ||
|
||
our @EXPORT_OK; | ||
push @EXPORT_OK, qw(hello); | ||
|
||
use lib 't/lib'; | ||
use MyChecker; | ||
|
||
use kura Foo => MyChecker->new; | ||
|
||
sub hello { 'Hello, Foo!' } | ||
|
||
1; |