-
-
14 Sep 2006 14:14:18 UTC
- Distribution: Declare-Constraints-Simple
- Source (raw)
- Browse (raw)
- Changes
- How to Contribute
- Issues (3)
- Testers (2628 / 11 / 4)
- Kwalitee
Bus factor: 0- 98.21% Coverage
- License: perl_5
- Activity
24 month- Tools
- Download (29.63KB)
- MetaCPAN Explorer
- Permissions
- Subscribe to distribution
- Permalinks
- This version
- Latest version
and 1 contributors-
Robert 'phaylon' Sedlacek
- Dependencies
- Carp::Clan
- Class::Inspector
- Scalar::Util
- aliased
- and possibly others
- Reverse dependencies
- CPAN Testers List
- Dependency graph
NAME
Declare::Constraints::Simple::Library::Exportable - Export Facilities
DESCRIPTION
This contains the constraint export logic of the module.
METHODS
import($flag, @args)
use ExportableModule->All; # or use ExportableModule-Only => qw(Constraint1 ...); # or use ExportableModule-Library;
Exports the constraints to the calling namespace. This includes all libraries in Declare::Constraints::Simple::Library, that package itself (providing all default constraints) or Declare::Constraints::Simple itself as a shortcut.
Possible flags are
- All
-
Imports all constraints registered in the class and its base classes.
- Only
-
use Declare::Constraints::Simple::Library::Scalar-Only => 'HasLength';
The above line would only import the
HasLength
constraints from theScalar
default library. Note however, that you could also just have saiduse Declare::Constraints::Simple-Only => 'HasLength';
as both
::Simple
and::Simple::Library
work on all default libraries. - Library
-
You can use this to define your own constraint library. For more information, see Declare::Constraints::Simple::Library::Base.
_build_handle_map()
Internal method to build constraint-to-class mappings.
_export_all($target, $handle_map)
Internal method. Exports all handles in
$handle_map
into the$target
namespace._export_these($target, $handle_map, @constraints)
Internal method. Exports all
@constraints
from$handle_map
into the$target
namespace.SEE ALSO
Declare::Constraints::Simple, Declare::Constraints::Simple::Library, Declare::Constraints::Simple::Library::Base
AUTHOR
Robert 'phaylon' Sedlacek
<phaylon@dunkelheit.at>
LICENSE AND COPYRIGHT
This module is free software, you can redistribute it and/or modify it under the same terms as perl itself.
Module Install Instructions
To install Declare::Constraints::Simple, copy and paste the appropriate command in to your terminal.
cpanm Declare::Constraints::Simple
perl -MCPAN -e shell install Declare::Constraints::Simple
For more information on module installation, please visit the detailed CPAN module installation guide.