Type::Library::Compiler - compile a bunch of type constraints into a library with no non-core dependencies
type-library-compiler --module=MyApp::Types Types::Standard=-all
This class performs the bulk of the work for type-library-compiler.
new( %attributes )
types
Required hash of Type::Tiny objects. Hash keys are the names the types will have in the generated library.
pod
Should the generated module include pod? Defaults to true.
destination_module
Required Perl module name to produce.
constraint_module
Leave this as the default.
destination_filename
compile_to_file()
Writes the module to destination_filename.
compile_to_string()
Returns the module as a string of Perl code.
parse_list( @argv )
Parses a list of strings used to specify type constraints on the command line, and returns a hashref of Type::Tiny objects, suitable for the types attribute.
Please report any bugs to <https://github.com/tobyink/p5-type-library-compiler/issues>.
Mite, Type::Library, Type::Tiny.
Toby Inkster <tobyink@cpan.org>.
This software is copyright (c) 2022 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
To install Type::Library::Compiler, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Type::Library::Compiler
CPAN shell
perl -MCPAN -e shell install Type::Library::Compiler
For more information on module installation, please visit the detailed CPAN module installation guide.