https://github.com/preaction/test-import
Test functions to ensure modules import things
https://github.com/preaction/test-import
Last synced: 9 months ago
JSON representation
Test functions to ensure modules import things
- Host: GitHub
- URL: https://github.com/preaction/test-import
- Owner: preaction
- License: other
- Created: 2014-04-08T03:19:02.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2018-11-17T05:33:14.000Z (over 7 years ago)
- Last Synced: 2024-06-21T18:58:44.342Z (about 2 years ago)
- Language: Perl
- Size: 16.6 KB
- Stars: 0
- Watchers: 2
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
README
NAME
Test::Import - Test functions to ensure modules import things
VERSION
version 0.004
SYNOPSIS
use Test::Import qw( :all );
# Ensure our base module imports strict
does_import_strict 'My::Base';
# Ensure our base module imports warnings
does_import_warnings 'My::Base';
# Ensure our base module imports a sub from another module
does_import_sub 'My::Base', 'Scalar::Util', 'blessed';
# Ensure our base module loads a class
does_import_class 'My::Base', 'File::Spec';
DESCRIPTION
This module encapsulates a bunch of tests for testing base or
boilerplate modules (e.g. modules that use Import::Into to force things
into the calling namespace). These tests ensure that the base module
imports what it says it imports.
EXPORTED FUNCTIONS
does_import_strict 'My::Module'
Ensure My::Module forces strict into the calling namespace.
does_import_warnings 'My::Module'
Ensure My::Module forces warnings into the calling namespace.
does_import_sub 'My::Module', 'Imported::Module', 'imported_sub'
Ensure that My::Module exports 'imported_sub' from Imported::Module into
the calling namespace.
does_import_class 'My::Module', 'Imported::Class'
Ensure that My::Module loads Imported::Class.
SEE ALSO
* Test::Exports
AUTHOR
Doug Bell
COPYRIGHT AND LICENSE
This software is copyright (c) 2014 by Doug Bell.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.