Server IP : 85.214.239.14 / Your IP : 18.191.120.103 Web Server : Apache/2.4.62 (Debian) System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64 User : www-data ( 33) PHP Version : 7.4.18 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : OFF Directory : /proc/2/root/proc/3/task/3/cwd/usr/share/perl5/Test/File/ShareDir/ |
Upload File : |
use 5.006; # pragmas use strict; use warnings; package Test::File::ShareDir::Module; our $VERSION = '1.001002'; # ABSTRACT: Simplified module oriented ShareDir tester our $AUTHORITY = 'cpan:KENTNL'; # AUTHORITY use File::ShareDir 1.00 qw(); use Test::File::ShareDir::Utils qw( extract_dashes ); sub import { my ( undef, $arg ) = @_; if ( not ref $arg or 'HASH' ne ref $arg ) { require Carp; return Carp::croak q[Must pass a hashref]; } my %input_config = %{$arg}; require Test::File::ShareDir::Object::Module; my $module_object = Test::File::ShareDir::Object::Module->new(extract_dashes('modules', \%input_config )); $module_object->install_all_modules(); $module_object->register(); return 1; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Test::File::ShareDir::Module - Simplified module oriented ShareDir tester =head1 VERSION version 1.001002 =head1 SYNOPSIS use Test::File::ShareDir::Module { '-root' => "some/root/path", 'Module::Foo' => "share/ModuleFoo", }; C<-root> is optional, and defaults to C<cwd> B<NOTE:> There's a bug prior to 5.18 with C<< use Foo { -key => } >>, so for backwards compatibility, make sure you either quote the key: C<< use Foo { '-key' => } >>, or make it the non-first key. =begin MetaPOD::JSON v1.1.0 { "namespace":"Test::File::ShareDir::Module", "interface":"exporter" } =end MetaPOD::JSON =head1 AUTHOR Kent Fredric <kentnl@cpan.org> =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2017 by Kent Fredric <kentnl@cpan.org>. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut