【文件属性】:
文件名称:p5-Type-Utils-Generics:轻松创建泛型类型
文件大小:28KB
文件格式:ZIP
更新时间:2021-03-09 20:23:27
Perl
姓名
Type :: Utils :: Generics-轻松创建泛型类型
概要
use Type::Utils::Generics qw( class_generics T );
package Queue {
use Moo;
use Types::Standard -types;
has data => (
is => 'ro',
isa => ArrayRef,
required => 1,
);
}
class_generics QueueType => (
class_name => 'Queue',
attributes => +{ data => ArrayRef[ T(0) ] },
);
subtest 'Queue[Str]' => sub {
my $QueueStrType = QueueT
【文件预览】:
p5-Type-Utils-Generics-master
----.github()
--------workflows()
----t()
--------lib()
--------class_generics.t(789B)
--------00_compile.t(97B)
--------generics()
----lib()
--------Type()
----Changes(92B)
----cpanfile.snapshot(48KB)
----Build.PL(301B)
----minil.toml(169B)
----LICENSE(18KB)
----README.md(2KB)
----META.json(2KB)
----.gitignore(238B)
----cpanfile(356B)