New Upstream Snapshot - libdevel-hide-perl
Ready changes
Summary
Merged new upstream version: 0.0015+git20130128.1.8d9ec1e (was: 0.0015).
Resulting package
Built on 2022-11-10T13:41 (took 8m12s)
The resulting binary packages can be installed (if you have the apt repository enabled) by running one of:
apt install -t fresh-snapshots libdevel-hide-perl
Lintian Result
Diff
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..c15b52a
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,16 @@
+blib/
+.build/
+_build/
+cover_db/
+inc/
+Build
+!Build/
+Build.bat
+.last_cover_stats
+Makefile
+Makefile.old
+MANIFEST.bak
+META.yml
+MYMETA.yml
+nytprof.out
+pm_to_blib
diff --git a/Changes b/Changes
deleted file mode 100644
index 13e7d44..0000000
--- a/Changes
+++ /dev/null
@@ -1,83 +0,0 @@
-Revision history for Perl extension Devel::Hide.
-
-0.0015 2021-09-28
-
- - Test warnings more carefully to avoid spurious test failures caused by a
- bug in Test2::Util (http://www.cpantesters.org/cpan/report/c01ff7be-1e8a-11ec-bc66-57723b537541)
-
-0.0014 2021-04-27
-
- - Bump version requirement of Test::More to one that supports note()
-
-0.0013 2020-02-16
-
- - Cope with changes to how the hints hash works in perl 5.31.7
-
-0.0012 2020-02-15
-
- - Add -lexically argument to import() to support hiding modules
- just during the current scope
-
-0.0011 2020-02-12
-
- - Fix https://rt.cpan.org/Public/Bug/Display.html?id=120220
- - Fix https://rt.cpan.org/Public/Bug/Display.html?id=120221
- - Add -quiet option to suppress some notices
-
-0.0010 2018-06-15 09:12:54-07:00 America/Los_Angeles
-
- - Makefile.PL: better prereqs declaration
- - typo fix - from dsteinbrunner/patch-1
-
-0.0009 Mon Jan 28 2013
-
- - avoid "defined @HIDDEN" which generates a warning since Perl 5.15.7 CPAN RT #74225
-
-0.0008 Thu Nov 15 2007
-
- - no real code changes
- - make t/050child-processes.t less clever for Windows' sake: which choked with too long
- argument and exec()
-
-0.0007 Mon Nov 5 2007
-
- - promoted: no longer a development release
-
-0.0006_01
-
- - some POD fixes
- - new option -from:children makes the selected modules hidden from process children as well
- (thanks to David Cantrell)
-
-0.0005 Wed May 30 2007
-
- - code reformatting with perltidy
- - now warns about already loaded modules
- - META.yml is auto-generated by Makefile.PL
- - a bit of refactoring to affect code readability
- - side effect: warnings are emitted at compile time and at every import call - a hopefully
- better timing
- - the package variable @HIDDEN does not change anymore
-
-0.0004 Tue May 29 2007
-
- - slight implementation change preparing for the big time
-
-0.0003 Wed Oct 4 2006
-
- - not a development version anymore
- - get rid of warning at "t/003user.t"
- - new test "t/098pod-coverage.t"
-
-0.00_02 Sun Sep 25 2005
-
- - lifted the requirement on perl 5.8: now 5.6.1 will do (because it may use File::Temp to
- fake bad modules)
-
-0.00_01 Tue Sep 20 2005
-
- - first release to CPAN
-
-0.00_00 Tue Sep 13 2005
-
- - absolute beginning
diff --git a/MANIFEST b/MANIFEST
deleted file mode 100644
index 6eda847..0000000
--- a/MANIFEST
+++ /dev/null
@@ -1,26 +0,0 @@
-Changes
-Makefile.PL
-MANIFEST
-README
-
-t/001use.t
-t/002basic.t
-t/003user.t
-t/004env.t
-t/005lib.t
-t/006before.t
-t/050child-processes.t Tests -from:children
-t/child.pl script run from t/050child-processes.t
-t/090pod.t Tests POD for errors
-t/098pod-coverage.t Tests for POD coverage
-t/quiet.t Test that -quiet suppresses (some) warnings
-t/too-late-quiet.t Test that -quiet doesn't suppress warnings about not hiding stuff
-t/lexically.t Test that restricting hiding to a lexical scope works
-
-t/P.pm Dummy module used in tests
-t/Q.pm "
-t/R.pm "
-
-lib/Devel/Hide.pm
-META.yml Module YAML meta-data (added by MakeMaker)
-META.json Module JSON meta-data (added by MakeMaker)
diff --git a/META.json b/META.json
deleted file mode 100644
index 9890c9e..0000000
--- a/META.json
+++ /dev/null
@@ -1,61 +0,0 @@
-{
- "abstract" : "Forces the unavailability of specified Perl modules (for testing)",
- "author" : [
- "Adriano Ferreira <ferreira@cpan.org>"
- ],
- "dynamic_config" : 0,
- "generated_by" : "ExtUtils::MakeMaker version 7.56, CPAN::Meta::Converter version 2.150010",
- "license" : [
- "perl_5"
- ],
- "meta-spec" : {
- "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
- "version" : 2
- },
- "name" : "Devel-Hide",
- "no_index" : {
- "directory" : [
- "t",
- "inc"
- ]
- },
- "prereqs" : {
- "build" : {
- "requires" : {
- "ExtUtils::MakeMaker" : "0"
- }
- },
- "configure" : {
- "requires" : {
- "ExtUtils::MakeMaker" : "0"
- }
- },
- "develop" : {
- "requires" : {
- "Test::Pod" : "1.18",
- "Test::Pod::Coverage" : "1.04"
- }
- },
- "runtime" : {
- "requires" : {
- "File::Temp" : "0",
- "perl" : "5.006001"
- }
- },
- "test" : {
- "requires" : {
- "Test::More" : "0.82"
- }
- }
- },
- "release_status" : "stable",
- "resources" : {
- "repository" : {
- "type" : "git",
- "url" : "https://github.com/aferreira/cpan-Devel-Hide.git",
- "web" : "https://github.com/aferreira/cpan-Devel-Hide"
- }
- },
- "version" : "0.0015",
- "x_serialization_backend" : "JSON::PP version 4.02"
-}
diff --git a/META.yml b/META.yml
deleted file mode 100644
index d113a7e..0000000
--- a/META.yml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-abstract: 'Forces the unavailability of specified Perl modules (for testing)'
-author:
- - 'Adriano Ferreira <ferreira@cpan.org>'
-build_requires:
- ExtUtils::MakeMaker: '0'
- Test::More: '0.82'
-configure_requires:
- ExtUtils::MakeMaker: '0'
-dynamic_config: 0
-generated_by: 'ExtUtils::MakeMaker version 7.56, CPAN::Meta::Converter version 2.150010'
-license: perl
-meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: '1.4'
-name: Devel-Hide
-no_index:
- directory:
- - t
- - inc
-requires:
- File::Temp: '0'
- perl: '5.006001'
-resources:
- repository: https://github.com/aferreira/cpan-Devel-Hide.git
-version: '0.0015'
-x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff --git a/Makefile.PL b/Makefile.PL
deleted file mode 100644
index 044f8d4..0000000
--- a/Makefile.PL
+++ /dev/null
@@ -1,49 +0,0 @@
-
-use 5.006001;
-use ExtUtils::MakeMaker;
-
-my $EUMM_VERSION = $ExtUtils::MakeMaker::VERSION;
-$EUMM_VERSION =~ tr/_//d;
-
-my %write_makefile_args = (
- NAME => 'Devel::Hide',
- VERSION_FROM => 'lib/Devel/Hide.pm',
- PREREQ_PM => {
- 'perl' => 5.006001,
- 'File::Temp' => 0, # perl ≤ 5.8.0
- },
- ABSTRACT_FROM => 'lib/Devel/Hide.pm',
- AUTHOR => 'Adriano Ferreira <ferreira@cpan.org>',
- LICENSE => 'perl',
- META_MERGE => {
- 'dynamic_config' => 0,
- 'meta-spec' => { version => 2 },
- 'prereqs' => {
- test => {
- requires => {
- 'Test::More' => 0.82,
- },
- },
- develop => {
- requires => {
- 'Test::Pod' => 1.18,
- 'Test::Pod::Coverage' => 1.04,
- },
- },
- },
- resources => {
- repository => {
- type => 'git',
- url => 'https://github.com/aferreira/cpan-Devel-Hide.git',
- web => 'https://github.com/aferreira/cpan-Devel-Hide',
- },
- },
- },
-);
-
-delete $write_makefile_args{LICENSE} if $EUMM_VERSION < 6.31;
-
-delete $write_makefile_args{META_MERGE} if $EUMM_VERSION < 6.4501;
-
-WriteMakefile(%write_makefile_args);
-
diff --git a/README b/README
deleted file mode 100644
index a1deda9..0000000
--- a/README
+++ /dev/null
@@ -1,43 +0,0 @@
-Devel-Hide version 0.0010
-=========================
-
-Simple tool for developers which allows to hide
-installed Perl modules. Used like this:
-
- perl -MDevel::Hide=Module/ToHide.pm script.pl
-
-
-INSTALLATION
-
-To install this module type the following:
-
- perl Makefile.PL
- make
- make test
- make install
-
-DEPENDENCIES
-
-This module requires
-
- File::Temp (for perls older than 5.8.0)
-
-and
-
- Test::More
-
-for the testing part and recommends
-
- Test::Pod 1.18
- Test::Pod::Coverage 1.04
-
-also for testing - the POD part.
-
-COPYRIGHT AND LICENCE
-
-Copyright (C) 2005-2007, 2018 by Adriano R. Ferreira
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
-
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..3ee59b5
--- /dev/null
+++ b/README.md
@@ -0,0 +1,2 @@
+cpan-Devel-Hide
+===============
\ No newline at end of file
diff --git a/debian/changelog b/debian/changelog
index 4fd817f..735ffcf 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+libdevel-hide-perl (0.0015+git20130128.1.8d9ec1e-1) UNRELEASED; urgency=low
+
+ * New upstream snapshot.
+
+ -- Debian Janitor <janitor@jelmer.uk> Thu, 10 Nov 2022 13:36:22 -0000
+
libdevel-hide-perl (0.0015-2) unstable; urgency=medium
[ Debian Janitor ]
diff --git a/lib/Devel/Hide.pm b/lib/Devel/Hide.pm
deleted file mode 100644
index 8ce88ec..0000000
--- a/lib/Devel/Hide.pm
+++ /dev/null
@@ -1,525 +0,0 @@
-package Devel::Hide;
-
-use 5.006001;
-use strict;
-use warnings;
-
-our $VERSION = '0.0015';
-
-# blech! package variables
-#
-# @HIDDEN is one of the ways to populate the global hidden list
-# $phase is used to identify which version of the hints hash to
-# use - either %^H when we're updating it, or pulling it out
-# of caller() when we want to read it
-use vars qw( @HIDDEN $phase );
-BEGIN { $phase = 'runtime'; }
-
-# settings are a comma- (and only comma, no quotes or spaces)
-# -separated list of key,value,key,value,... There is no
-# attempt to support data containing commas.
-#
-# The list of hidden modules is a comma (and *only* comma,
-# no white space, no quotes) separated list of module
-# names.
-#
-# yes, this is a ridiculous way of storing data. It is,
-# however, compatible with what we're going to have to
-# store in the hints hash for lexical hiding, as that
-# only supports string data.
-my %GLOBAL_SETTINGS;
-_set_setting('global', children => 0);
-_set_setting('global', verbose =>
- defined $ENV{DEVEL_HIDE_VERBOSE}
- ? $ENV{DEVEL_HIDE_VERBOSE}
- : 1
-);
-
-# convert a mixed list of modules and filenames to a list of
-# filenames
-sub _as_filenames {
- return map { /^(\w+::)*\w+$/
- ? do { my $f = "$_.pm"; $f =~ s|::|/|g; $f }
- : $_
- } @_;
-}
-
-# Pushes a list to the set of hidden modules/filenames
-# warns about the modules which could not be hidden (always)
-# and about the ones that were successfully hidden (if verbose)
-#
-# It works as a batch producing warning messages
-# at each invocation (when appropriate).
-#
-# the first arg is a reference to the config hash to use,
-# either global or lexical
-sub _push_hidden {
- my $config = shift;
-
- return unless @_;
-
- my @too_late;
- for ( _as_filenames(@_) ) {
- if ( $INC{$_} ) {
- push @too_late, $_;
- }
- else {
- $config->{'Devel::Hide/hidden'} =
- $config->{'Devel::Hide/hidden'}
- ? join(',', $config->{'Devel::Hide/hidden'}, $_)
- : $_;
- }
- }
- if ( @too_late ) {
- warn __PACKAGE__, ': Too late to hide ', join( ', ', @too_late ), "\n";
- }
- if ( _get_setting('verbose') && $config->{'Devel::Hide/hidden'}) {
- no warnings 'uninitialized';
- warn __PACKAGE__ . ' hides ' .
- join(
- ', ',
- sort split(
- /,/, $config->{'Devel::Hide/hidden'}
- )
- ) . "\n";
- }
-}
-
-sub _dont_load {
- my $filename = shift;
- my $hidden_by = _get_setting('verbose')
- ? 'hidden'
- : 'hidden by ' . __PACKAGE__;
- die "Can't locate $filename in \@INC ($hidden_by)\n";
-}
-
-=begin private
-
-=item B<_core_modules>
-
- @core = _core_modules($perl_version);
-
-Returns the list of core modules according to
-Module::CoreList.
-
-!!! UNUSED BY NOW
-
-It is aimed to expand the tag ':core' into all core
-modules in the current version of Perl ($]).
-Requires Module::CoreList.
-
-=end private
-
-=cut
-
-sub _core_modules {
- require Module::CoreList; # XXX require 2.05 or newer
- return Module::CoreList->find_modules( qr/.*/, shift );
-}
-
-# _append_to_perl5opt(@to_be_hidden)
-sub _append_to_perl5opt {
-
- $ENV{PERL5OPT} = join( ' ',
- defined($ENV{PERL5OPT}) ? $ENV{PERL5OPT} : (),
- '-MDevel::Hide=' . join(',', @_)
- );
-
-}
-
-sub _is_hidden {
- no warnings 'uninitialized';
- my $module = shift;
-
- +{
- map { $_ => 1 }
- map {
- split(',', _get_config_ref($_)->{'Devel::Hide/hidden'})
- } qw(global lexical)
- }->{$module};
-}
-
-sub _get_setting {
- my $name = shift;
- _exists_setting('lexical', $name)
- ? _get_setting_from('lexical', $name)
- : _get_setting_from('global', $name)
-}
-
-sub _get_setting_from {
- my($source, $name) = @_;
-
- my $config = _get_config_ref($source);
- _setting_hashref($config)->{$name};
-}
-
-sub _exists_setting {
- my($source, $name) = @_;
-
- my $config = _get_config_ref($source);
- exists(_setting_hashref($config)->{$name});
-}
-
-sub _set_setting {
- my($source, $name, $value) = @_;
-
- my $config = _get_config_ref($source);
- my %hash = (
- %{_setting_hashref($config)},
- $name => $value
- );
- _get_config_ref($source)
- ->{'Devel::Hide/settings'} = join(',', %hash);
-}
-
-sub _setting_hashref {
- my $settings = shift->{'Devel::Hide/settings'};
- no warnings 'uninitialized';
- +{ split(/,/, $settings) };
-}
-
-sub _get_config_ref {
- my $type = shift;
- if($type eq 'lexical') {
- if($phase eq 'compile') {
- return \%^H;
- } else {
- my $depth = 1;
- while(my @fields = caller($depth)) {
- my $hints_hash = $fields[10];
- if($hints_hash && grep { /^Devel::Hide\// } keys %{$hints_hash}) {
- # return a copy
- return { %{$hints_hash} };
- }
- $depth++;
- }
- return {};
- }
- } else {
- return \%GLOBAL_SETTINGS;
- }
-}
-
-sub import {
- shift;
- my $which_config = 'global';
- local $phase = 'compile';
- while(@_ && $_[0] =~ /^-/) {
- if( $_[0] eq '-lexically' ) {
- $which_config = 'lexical';
- if($] < 5.010) {
- die("Can't 'use Devel::Hide qw(-lexically ...)' on perl 5.8 and below\n");
- }
- } elsif( $_[0] eq '-from:children' ) {
- _set_setting($which_config, children => 1);
- } elsif( $_[0] eq '-quiet' ) {
- _set_setting($which_config, verbose => 0);
- } else {
- die("Devel::Hide: don't recognize $_[0]\n");
- }
- shift;
- }
- if (@_) {
- _push_hidden(
- _get_config_ref($which_config),
- @_
- );
- if (_get_setting('children')) {
- _append_to_perl5opt(
- (_get_setting('verbose') ? () : '-quiet'),
- @_
- );
- }
- }
-}
-
-# $ENV{DEVEL_HIDE_PM} is split in ' '
-# as well as @HIDDEN it accepts Module::Module as well as File/Names.pm
-BEGIN {
- # unless @HIDDEN was user-defined elsewhere, set default
- if ( !@HIDDEN && $ENV{DEVEL_HIDE_PM} ) {
- # NOTE. "split ' ', $s" is special. Read "perldoc -f split".
- _push_hidden(
- _get_config_ref('global'),
- split q{ }, $ENV{DEVEL_HIDE_PM}
- );
- }
- else {
- _push_hidden(
- _get_config_ref('global'),
- @HIDDEN
- );
- }
-}
-
-sub _inc_hook {
- my ( $coderef, $filename ) = @_;
- if ( _is_hidden($filename) ) { _dont_load($filename); }
- else { return undef; }
-}
-
-use lib ( \&_inc_hook );
-
-# TO DO:
-# * write unimport() sub
-# * write decent docs
-# * refactor private function names
-# * RT #25528
-
-=begin private
-
-perl -MDevel::Hide=!:core -e script.pl # hide all non-core modules
-perl -MDevel::Hide=M,!N -e script.pl # hide all modules but N plus M
-
-how to implement
-
-%GLOBAL_SETTINGS
-%IS_EXCEPTION if there is an exception, all but the set of exceptions are to be hidden
- plus the set of hidden modules
-
- :core(5.8)
- :core synonym to :core($])
-
-
-=end private
-
-=cut
-
-1;
-
-__END__
-
-=head1 NAME
-
-Devel::Hide - Forces the unavailability of specified Perl modules (for testing)
-
-
-=head1 SYNOPSIS
-
- # hide modules globally, across the entire process
-
- use Devel::Hide qw(Module/ToHide.pm);
- require Module::ToHide; # fails
-
- use Devel::Hide qw(Test::Pod Test::Pod::Coverage);
- require Test::More; # ok
- use Test::Pod 1.18; # fails
-
- # hide modules lexically
- {
- use Devel::Hide qw(-lexically Foo::Bar);
- # this will fail to load
- eval 'use Foo::Bar';
- }
- # but this will load
- use Foo::Bar;
-
-Other common usage patterns:
-
- $ perl -MDevel::Hide=Module::ToHide Makefile.PL
- $ perl -MDevel::Hide=Module::ToHide,Test::Pod Makefile.PL
-
- $ PERL5OPT=-MDevel::Hide
- $ DEVEL_HIDE_PM='Module::ToHide Test::Pod'
- $ export PERL5OPT DEVEL_HIDE_PM
- $ perl Makefile.PL
-
-=head1 COMPATIBILITY
-
-=over
-
-=item global hiding
-
-At some point global hiding may B<go away> and only lexical
-hiding be supported. At that point support for perl versions
-below 5.10 will be dropped. There will be at least a two year
-deprecation cycle before that happens.
-
-You are strongly encouraged to only use lexical hiding and to
-update existing code.
-
-=item perl 5.6
-
-Support will be dropped at some point after 2022-01-01 with no
-further warning. This is because bugs in older perls prevent
-some code improvements. See commit dd27e50 in the repository
-if you care to know what those are.
-
-=back
-
-=head1 DESCRIPTION
-
-Given a list of Perl modules/filenames, this module makes
-C<require> and C<use> statements fail (no matter the
-specified files/modules are installed or not).
-
-They I<die> with a message like:
-
- Can't locate Module/ToHide.pm in @INC (hidden)
-
-The original intent of this module is to allow Perl developers
-to test for alternative behavior when some modules are not
-available. In a Perl installation, where many modules are
-already installed, there is a chance to screw things up
-because you take for granted things that may not be there
-in other machines.
-
-For example, to test if your distribution does the right thing
-when a module is missing, you can do
-
- perl -MDevel::Hide=Test::Pod Makefile.PL
-
-forcing C<Test::Pod> to not be found (whether it is installed
-or not).
-
-Another use case is to force a module which can choose between
-two requisites to use the one which is not the default.
-For example, C<XML::Simple> needs a parser module and may use
-C<XML::Parser> or C<XML::SAX> (preferring the latter).
-If you have both of them installed, it will always try C<XML::SAX>.
-But you can say:
-
- perl -MDevel::Hide=XML::SAX script_which_uses_xml_simple.pl
-
-NOTE. This module does not use L<Carp>. As said before,
-denial I<dies>.
-
-This module is pretty trivial. It uses a code reference
-in @INC to get rid of specific modules during require -
-denying they can be successfully loaded and stopping
-the search before they have a chance to be found.
-
-There are three alternative ways to include modules in
-the hidden list:
-
-=over 4
-
-=item import()
-
-this is probably the most commonly used method, called automagically
-when you do this:
-
- use Devel::Hide qw(Foo Bar::Baz);
-
-or
-
- perl -MDevel::Hide=...
-
-=item setting @Devel::Hide::HIDDEN
-
-=item environment variable DEVEL_HIDE_PM
-
-both of these two only support 'global' hiding, whereas C<import()>
-supports lexical hiding as well.
-
-=back
-
-Optionally, you can provide some arguments *before* the
-list of modules:
-
-=over
-
-=item -from:children
-
-propagate the list of hidden modules to your
-process' child processes. This works by populating
-C<PERL5OPT>, and is incompatible with Taint mode, as
-explained in L<perlrun>. Of course, this is unnecessary
-if your child processes are just forks of the current one.
-
-=item -lexically
-
-This is only available on perl 5.10.0 and later. It is a fatal
-error to try to use it on an older perl.
-
-Everything following this will only have effect until the
-end of the current scope. Yes, that includes C<-quiet>.
-
-=begin private
-
-PERL5OPT is populated globally even when -lexically is in use.
-How can its value be lexicalised? Or how can all the various ways
-of spawning a child be lexicalised?
-
-=end private
-
-=item -quiet
-
-suppresses diagnostic output. You will still get told about
-errors. This is passed to child processes if -from:children
-is in effect.
-
-=back
-
-=head1 CAVEATS
-
-There is some interaction between C<lib> and this module
-
- use Devel::Hide qw(Module/ToHide.pm);
- use lib qw(my_lib);
-
-In this case, 'my_lib' enters the include path before
-the Devel::Hide hook and if F<Module/ToHide.pm> is found
-in 'my_lib', it succeeds. More generally, any code that
-adds anything to the front of the C<@INC> list after
-Devel::Hide is loaded will have this effect.
-
-Also for modules that were loaded before Devel::Hide,
-C<require> and C<use> succeeds.
-
-Since 0.0005, Devel::Hide warns about modules already loaded.
-
- $ perl -MDevel::Hide=Devel::Hide -e ''
- Devel::Hide: Too late to hide Devel/Hide.pm
-
-=head1 EXPORTS
-
-Nothing is exported.
-
-=head1 ENVIRONMENT VARIABLES
-
-DEVEL_HIDE_PM - if defined, the list of modules is added
- to the list of hidden modules
-
-DEVEL_HIDE_VERBOSE - on by default. If off, suppresses
- the initial message which shows the list of hidden modules
- in effect
-
-PERL5OPT - used if you specify '-from:children'
-
-=head1 SEE ALSO
-
-L<perldoc -f require>
-
-L<Test::Without::Module>
-
-=head1 BUGS
-
-=over
-
-=item bug
-
-C<-from:children> and C<-lexically> don't like each other. Anything
-hidden lexically may be hidden from all child processes without
-regard for scope. Don't use them together.
-
-=back
-
-Please report any other bugs you find via CPAN RT
-L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Devel-Hide>.
-
-=head1 AUTHORS
-
-Adriano R. Ferreira, E<lt>ferreira@cpan.orgE<gt>
-
-with contributions from David Cantrell E<lt>dcantrell@cpan.orgE<gt>
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright (C) 2005-2007, 2018 by Adriano R. Ferreira
-
-Some parts copyright (C) 2020 by David Cantrell
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself.
-
diff --git a/t/001use.t b/t/001use.t
deleted file mode 100644
index d861663..0000000
--- a/t/001use.t
+++ /dev/null
@@ -1,7 +0,0 @@
-
-use strict;
-use Test::More tests => 1;
-
-use_ok('Devel::Hide');
-
-diag( "Testing Devel::Hide $Devel::Hide::VERSION, Perl $], $^X" );
\ No newline at end of file
diff --git a/t/002basic.t b/t/002basic.t
deleted file mode 100644
index 57e1746..0000000
--- a/t/002basic.t
+++ /dev/null
@@ -1,38 +0,0 @@
-use strict;
-use warnings;
-use Test::More tests => 14;
-
-use lib 't';
-
-my @expected_warnings;
-BEGIN {
- push @expected_warnings,
- 'Devel::Hide hides Q.pm, R.pm';
- $SIG{__WARN__} = sub {
- ok($_[0] eq shift(@expected_warnings)."\n",
- "got expected warning: $_[0]");
- }
-}
-END { ok(!@expected_warnings, "got all expected warnings") }
-
-use Devel::Hide qw(Q.pm R);
-
-# do this twice, see https://rt.cpan.org/Ticket/Display.html?id=120220
-foreach my $pass (1, 2) {
- eval { require P };
- ok(!$@, "nothing moaned about loading P".
- ($pass == 2 ? ' again' : ''));
- ok(exists($INC{"P.pm"}), "P is loaded");
-
- eval { require Q };
- like($@, qr/^Can't locate Q\.pm in \@INC/,
- "correctly moaned about loading Q".
- ($pass == 2 ? ' again' : ''));
- ok(!exists($INC{"Q.pm"}), "correctly didn't load Q");
-
- eval { require R };
- like($@, qr/^Can't locate R\.pm in \@INC/,
- "correctly moaned about loading R".
- ($pass == 2 ? ' again' : ''));
- ok(!exists($INC{"R.pm"}), "correctly didn't load R");
-}
diff --git a/t/003user.t b/t/003user.t
deleted file mode 100644
index 241188f..0000000
--- a/t/003user.t
+++ /dev/null
@@ -1,24 +0,0 @@
-
-use strict;
-use warnings;
-use Test::More tests => 5;
-
-use_ok('lib', 't');
-
-# this script tests setting @HIDDEN before using Devel::Hide
-
-{
-no warnings 'once'; # @HIDDEN is used by Devel::Hide
-@Devel::Hide::HIDDEN = qw(Q.pm R);
-}
-
-use_ok('Devel::Hide');
-
-eval { require P };
-ok(!$@, "P was loaded (as it should)");
-
-eval { require Q };
-like($@, qr/^Can't locate Q\.pm/, "Q not found (as it should)");
-
-eval { require R };
-like($@, qr/^Can't locate R\.pm/, "R not found (as it should)");
diff --git a/t/004env.t b/t/004env.t
deleted file mode 100644
index 68b79c5..0000000
--- a/t/004env.t
+++ /dev/null
@@ -1,19 +0,0 @@
-
-use strict;
-use Test::More tests => 5;
-
-use_ok('lib', 't');
-
-# this script tests Devel::Hide respects environment variable DEVEL_HIDE_PM
-
-$ENV{DEVEL_HIDE_PM} = 'Q.pm R';
-use_ok('Devel::Hide');
-
-eval { require P };
-ok(!$@, "P was loaded (as it should)");
-
-eval { require Q };
-like($@, qr/^Can't locate Q\.pm/, "Q not found (as it should)");
-
-eval { require R };
-like($@, qr/^Can't locate R\.pm/, "R not found (as it should)");
diff --git a/t/005lib.t b/t/005lib.t
deleted file mode 100644
index 93683d3..0000000
--- a/t/005lib.t
+++ /dev/null
@@ -1,13 +0,0 @@
-
-use strict;
-use Test::More tests => 4;
-
-use_ok('lib', 't');
-
-# this script tests "use lib" after "use Devel::Hide"
-
-use_ok('Devel::Hide');
-use_ok('lib', 't'); # put 't' before the Devel::Hide hook in @INC
-
-eval { require P };
-ok(!$@, "P was loaded (as it should)");
diff --git a/t/006before.t b/t/006before.t
deleted file mode 100644
index a201c73..0000000
--- a/t/006before.t
+++ /dev/null
@@ -1,26 +0,0 @@
-use strict;
-use warnings;
-use Test::More tests => 7;
-
-use lib 't';
-
-my @expected_warnings;
-BEGIN {
- push @expected_warnings,
- 'Devel::Hide: Too late to hide P.pm',
- 'Devel::Hide hides Q.pm';
- $SIG{__WARN__} = sub {
- ok($_[0] eq shift(@expected_warnings)."\n",
- "got expected warning: $_[0]");
- }
-}
-END { ok(!@expected_warnings, "got all expected warnings") }
-
-use_ok('P'); # loads P
-use_ok('Devel::Hide', 'P', 'Q'); # too late to hide P
-
-eval { require P };
-ok(!$@, "P was loaded (as it should)");
-
-eval { require Q };
-ok($@, "Q was not loaded");
diff --git a/t/050child-processes.t b/t/050child-processes.t
deleted file mode 100644
index 847ae8b..0000000
--- a/t/050child-processes.t
+++ /dev/null
@@ -1,19 +0,0 @@
-use strict;
-use warnings;
-use Devel::Hide qw(-quiet -from:children Q.pm R);
-
-# Mlib=t is to get around 'use lib' etc being annoying
-
-$ENV{PERL5OPT} = '-Mblib '.$ENV{PERL5OPT}
- if($INC{'blib.pm'});
-$ENV{PERL5OPT} = '-Mlib=t '.$ENV{PERL5OPT};
-
-# run this script and tell it to:
-# try to load P, Q and R;
-# expect only P to succeed;
-# moan about Q and R
-my $ans = system( $^X, qw(
- t/child.pl try:PQR succeed:P moan:QR
-) );
-
-exit( $ans >> 8 );
diff --git a/t/090pod.t b/t/090pod.t
deleted file mode 100644
index 10319d0..0000000
--- a/t/090pod.t
+++ /dev/null
@@ -1,7 +0,0 @@
-
-use strict;
-use Test::More;
-eval "use Test::Pod 1.18";
-plan skip_all => "Test::Pod 1.18 required for testing POD" if $@;
-
-all_pod_files_ok(all_pod_files("."));
diff --git a/t/098pod-coverage.t b/t/098pod-coverage.t
deleted file mode 100644
index 30a71c2..0000000
--- a/t/098pod-coverage.t
+++ /dev/null
@@ -1,7 +0,0 @@
-
-use Test::More;
-
-eval "use Test::Pod::Coverage 1.04";
-plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
-
-all_pod_coverage_ok();
\ No newline at end of file
diff --git a/t/P.pm b/t/P.pm
deleted file mode 100644
index f184c8c..0000000
--- a/t/P.pm
+++ /dev/null
@@ -1,5 +0,0 @@
-
-package P;
-
-1;
-
diff --git a/t/Q.pm b/t/Q.pm
deleted file mode 100644
index d0d2297..0000000
--- a/t/Q.pm
+++ /dev/null
@@ -1,5 +0,0 @@
-
-package Q;
-
-1;
-
diff --git a/t/R.pm b/t/R.pm
deleted file mode 100644
index 0ba346d..0000000
--- a/t/R.pm
+++ /dev/null
@@ -1,5 +0,0 @@
-
-package R;
-
-1;
-
diff --git a/t/child.pl b/t/child.pl
deleted file mode 100644
index 1900938..0000000
--- a/t/child.pl
+++ /dev/null
@@ -1,33 +0,0 @@
-use strict;
-use warnings;
-
-my $warnings;
-BEGIN { $SIG{__WARN__} = sub {
- $warnings++ if($_[0] =~ /^Devel::Hide/)
-} }
-my %args;
-BEGIN {
- %args = map {
- my($k, $v) = split(/:/, $_);
- $k => [split(//, $v)]
- } @ARGV;
-}
-
-# the command line had -MDevel::Hide=-quiet so
-# the warning this generates should be suppressed
-use Devel::Hide 'Q';
-
-use Test::More tests => 2 + @{$args{try}};
-
-ok($ENV{PERL5OPT} =~ /\bMlib=t\b/, "PERL5OPT is added to, not overwritten: $ENV{PERL5OPT}");
-
-foreach my $try (@{$args{try}}) {
- eval "require $try";
- if(!grep { $_ eq $try } @{$args{moan}}) {
- ok(!$@, "nothing moaned about loading $try");
- } else {
- like($@, qr/^Can't locate $try\.pm/, "correctly moaned about loading $try");
- }
-}
-
-ok(!$warnings, "suppressed warnings");
diff --git a/t/lexically.t b/t/lexically.t
deleted file mode 100644
index cd260bc..0000000
--- a/t/lexically.t
+++ /dev/null
@@ -1,66 +0,0 @@
-use strict;
-use warnings;
-
-BEGIN {
- require Test::More;
- $] < 5.010
- ? Test::More->import(skip_all => "perl too old")
- : Test::More->import(tests => 9);
-}
-
-use lib 't';
-
-my @expected_warnings;
-BEGIN {
- push @expected_warnings,
- 'Devel::Hide hides R.pm',
- 'Devel::Hide hides Q.pm';
- $SIG{__WARN__} = sub {
- if(!@expected_warnings) {
- fail("Got unexpected warning '$_[0]'")
- } else {
- is($_[0], shift(@expected_warnings)."\n",
- "got expected warning: $_[0]");
- }
- }
-}
-END { ok(!@expected_warnings, "got all expected warnings") }
-
-# hide R globally
-use Devel::Hide qw(R);
-note("R hidden globally, and noisily");
-
-eval { require R };
-like($@, qr/^Can't locate R\.pm in \@INC/,
- "correctly moaned about hiding R (globally)");
-
-{
- use Devel::Hide qw(-lexically -quiet Q.pm);
- note("Q hidden lexically, quietly");
-
- eval { require Q };
- like($@, qr/^Can't locate Q\.pm in \@INC/,
- "correctly moaned about loading Q");
-
- eval { require R };
- like($@, qr/^Can't locate R\.pm in \@INC/,
- "still can't load R which is globally hidden");
-}
-
-{
- use Devel::Hide qw(-lexically Q);
- note("Q hidden in a different scope, noisily");
-
- eval { require Q };
- like($@, qr/^Can't locate Q\.pm in \@INC/,
- "correctly moaned about loading Q");
-}
-
-note("Now we're outside that lexical scope");
-
-eval { require Q };
-ok(!$@, "nothing moaned about loading Q");
-
-eval { require R };
-like($@, qr/^Can't locate R\.pm in \@INC/,
- "still can't load R");
diff --git a/t/quiet.t b/t/quiet.t
deleted file mode 100644
index 2ec0eee..0000000
--- a/t/quiet.t
+++ /dev/null
@@ -1,15 +0,0 @@
-use strict;
-use warnings;
-use Test::More tests => 2;
-
-use lib 't';
-
-my $warnings;
-BEGIN { $SIG{__WARN__} = sub { $warnings++ } }
-END { ok(!$warnings, "suppressed warnings"); }
-
-use Devel::Hide qw(-quiet Q);
-
-eval { require Q };
-like($@, qr/^Can't locate Q\.pm in \@INC/,
- "correctly moaned about loading Q");
diff --git a/t/too-late-quiet.t b/t/too-late-quiet.t
deleted file mode 100644
index c516012..0000000
--- a/t/too-late-quiet.t
+++ /dev/null
@@ -1,27 +0,0 @@
-use strict;
-use warnings;
-use Test::More tests => 6;
-
-use lib 't';
-
-my @expected_warnings;
-BEGIN {
- push @expected_warnings,
- 'Devel::Hide: Too late to hide P.pm';
- $SIG{__WARN__} = sub {
- ok($_[0] eq shift(@expected_warnings)."\n",
- "got expected warning: $_[0]");
- }
-}
-END { ok(!@expected_warnings, "got all expected warnings") }
-
-use_ok('P'); # loads P
-
-# too late to hide P. Q will be hidden, but not mentioned
-use_ok('Devel::Hide', '-quiet', 'P', 'Q');
-
-eval { require P };
-ok(!$@, "P was loaded (as it should)");
-
-eval { require Q };
-ok($@, "Q was not loaded");
Debdiff
[The following lists of changes regard files as different if they have different names, permissions or owners.]
Files in first set of .debs but not in second
-rw-r--r-- root/root /usr/share/doc/libdevel-hide-perl/changelog.gz -rw-r--r-- root/root /usr/share/man/man3/Devel::Hide.3pm.gz -rw-r--r-- root/root /usr/share/perl5/Devel/Hide.pm
Control files: lines which differ (wdiff format)
Depends: perl:any