12 Feb 2022 18:30:15 UTC
- Distribution: Test-MockFile
- Source (raw)
- Browse (raw)
- How to Contribute
- Issues (23)
- Testers (81 / 130 / 0)
- KwaliteeBus factor: 3
- 77.96% Coverage
- License: artistic_2
- Perl: v5.6.0
- Activity24 month
- Download (45.94KB)
- MetaCPAN Explorer
- Subscribe to distribution
- This version
- Latest versionTODDR Todd Rinaldoand 1 contributors
- Todd Rinaldo
Test::MockFile::DirHandle - Provides a class object for Test::MockFile to give out for opendir calls.
This is a helper class for Test::MockFile its only purpose is to provide a object to recognize that a the passed handle is a mocked handle. Test::MockFile has to mock the other calls since there is no tie for opendir handles.
# This is what Test::MockFile does. You really shouldn't be doing it directly. use Test::MockFile::DirHandle; my $handle = Test::MockFile::DirHandle->new("/fake/path", [qw/. .. a bbb ccc dd/]);
No exports are provided by this module.
Args: ($class, $dir, $files_array_ref)
Returns a blessed object for Test::MockFile::DirHandle. There are no error conditions handled here.
NOTE: the permanent directory contents are stored in a hash in Test::MockFile. However when opendir is called, a copy is stored here. This is because through experimentation, we've determined that adding files in a dir during a opendir/readdir does not affect the return of readdir.
<toddr at cpan.org>
Please report any bugs or feature requests to https://github.com/CpanelInc/Test-MockFile.
You can find documentation for this module with the perldoc command.
You can also look for information at:
Copyright 2018 cPanel L.L.C.
All rights reserved.
This is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic.
Module Install Instructions
To install Test::MockFile, copy and paste the appropriate command in to your terminal.
perl -MCPAN -e shell install Test::MockFile
For more information on module installation, please visit the detailed CPAN module installation guide.