Windows NT KAMIDAKI 10.0 build 19045 (Windows 10) AMD64
Apache/2.4.58 (Win64) OpenSSL/3.1.3 PHP/8.3.9
Server IP : 192.168.3.16 & Your IP : 216.73.216.204
Domains :
Cant Read [ /etc/named.conf ]
User : SISTEMA
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
C: /
xampp /
perl /
vendor /
lib /
Test2 /
Delete
Unzip
Name
Size
Permission
Date
Action
AsyncSubtest
[ DIR ]
drwxrwxrwx
2024-07-26 17:39
Bundle
[ DIR ]
drwxrwxrwx
2024-07-26 17:39
Compare
[ DIR ]
drwxrwxrwx
2024-07-26 17:39
Event
[ DIR ]
drwxrwxrwx
2024-07-26 17:39
Manual
[ DIR ]
drwxrwxrwx
2024-07-26 17:39
Plugin
[ DIR ]
drwxrwxrwx
2024-07-26 17:39
Require
[ DIR ]
drwxrwxrwx
2024-07-26 17:39
Tools
[ DIR ]
drwxrwxrwx
2024-07-26 17:39
Util
[ DIR ]
drwxrwxrwx
2024-07-26 17:39
Workflow
[ DIR ]
drwxrwxrwx
2024-07-26 17:39
AsyncSubtest.pm
18.68
KB
-rw-rw-rw-
2020-12-16 05:48
Bundle.pm
1.52
KB
-rw-rw-rw-
2020-12-16 05:48
Compare.pm
11.53
KB
-rw-rw-rw-
2020-12-16 05:48
Manual.pm
1.49
KB
-rw-rw-rw-
2020-12-16 05:48
Mock.pm
21.68
KB
-rw-rw-rw-
2020-12-16 05:48
Plugin.pm
1.83
KB
-rw-rw-rw-
2020-12-16 05:48
Require.pm
2.65
KB
-rw-rw-rw-
2020-12-16 05:48
Suite.pm
9.26
KB
-rw-rw-rw-
2020-12-16 05:48
Todo.pm
3.77
KB
-rw-rw-rw-
2020-12-16 05:48
Tools.pm
2.51
KB
-rw-rw-rw-
2020-12-16 05:48
V0.pm
10.79
KB
-rw-rw-rw-
2020-12-16 05:48
Workflow.pm
7.13
KB
-rw-rw-rw-
2020-12-16 05:48
Save
Rename
package Test2::Require; use strict; use warnings; our $VERSION = '0.000139'; use Test2::API qw/context/; use Carp qw/croak/; sub skip { my $class = shift; croak "Class '$class' needs to implement 'skip()'"; } sub import { my $class = shift; return if $class eq __PACKAGE__; my $skip = $class->skip(@_); return unless defined $skip; my $ctx = context(); $ctx->plan(0, SKIP => $skip || "No reason given."); $ctx->release; } 1; __END__ =pod =encoding UTF-8 =head1 NAME Test2::Require - Base class and documentation for skip-unless type test packages. =head1 DESCRIPTION Test2::Require::* packages are packages you load to ensure your test file is skipped unless a specific requirement is met. Modules in this namespace may subclass L<Test2::Require> if they wish, but it is not strictly necessary to do so. =head1 HOW DO I WRITE A 'REQUIRE' MODULE? =head2 AS A SUBCLASS package Test2::Require::Widget; use strict; use warnings; use base 'Test2::Require'; sub HAVE_WIDGETS { ... }; sub skip { my $class = shift; my @import_args = @_; if (HAVE_WIDGETS()) { # We have widgets, do not skip return undef; } else { # No widgets, skip the test return "Skipped because there are no widgets" unless HAVE_WIDGETS(); } } 1; A subclass of L<Test2::Require> simply needs to implement a C<skip()> method. This method will receive all import arguments. This method should return undef if the test should run, and should return a reason for skipping if the test should be skipped. =head2 STAND-ALONE If you do not wish to subclass L<Test2::Require> then you should write an C<import()> method: package Test2::Require::Widget; use strict; use warnings; use Test2::API qw/context/; sub HAVE_WIDGETS { ... }; sub import { my $class = shift; # Have widgets, should run. return if HAVE_WIDGETS(); # Use the context object to create the event my $ctx = context(); $ctx->plan(0, SKIP => "Skipped because there are no widgets"); $ctx->release; } 1; =head1 SOURCE The source code repository for Test2-Suite can be found at F<https://github.com/Test-More/Test2-Suite/>. =head1 MAINTAINERS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 AUTHORS =over 4 =item Chad Granum E<lt>exodist@cpan.orgE<gt> =back =head1 COPYRIGHT Copyright 2018 Chad Granum E<lt>exodist@cpan.orgE<gt>. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See F<http://dev.perl.org/licenses/> =cut