CPAN-Reporter-1.2019000755000765000024 014423611161 13350 5ustar00garustaff000000000000Todo100644000765000024 700614423611161 14264 0ustar00garustaff000000000000CPAN-Reporter-1.2019TODO list for Perl module CPAN::Reporter #--------------------------------------------------------------------------# # Bugs #--------------------------------------------------------------------------# #--------------------------------------------------------------------------# # Features, etc #--------------------------------------------------------------------------# # NOW NOW NOW NOW NOW - Add support for CPAN::Reporter singleton for CPANPLUS refactoring - Look for .cpanreporter in a known place for Strawberry preconfig (e.g. in @INC where CPAN/Reporter.pm is found?) # High priority - Add utility sub to invoke a test (for C::R::S and PoCo::C::R) - Add Oslo Accords environment variables - Add datestamps to history (ISO 8601: YYYY-MM-DD HH:MM:SS) - my @t=localtime; $t[4]++; $t[5]+=1900; my $iso = sprintf("%4d-%02d-%02d %02d:%02d:%02d", reverse @t[0..5]); - For failure in PL stage -- in report, show configure_requires and an error message that other requirements aren't available if PL fails - change report truncation to take first 25K and last 25K (summary) (?!) - check for working signals regardless of platform and skip if not working -- maybe during *.PL (write a signaling file) # Medium priority - search for recursive Makefile.PL only at depth 1 - list installed versions of any modules in requires/recommends/etc - list path of requires/recommends/etc/ - 'force_prompt' config to locally unset PERL_MM_USE_DEFAULT (Rezic) - add results back to CPAN::Distribution object - Create a discards file that shows missing prerequisites for each discarded report. Could be interesting data to find highly requested. Or, perhaps track *all* prerequisites for all files tested. Very interesting data I suspect. Probably not something that should be on by default # Low priority - document Windows ErrorMode registry hack to stop segfault dialog - add earlier, successful phases to output in reverse order. Probably have to bump up the test-length cutoff, though, to deal with lengthy make output - Test phase output - make phase output - PL phase output - refactor t/Helper.pm - switch from a single flat file for history. e.g. - SDBM_File for history (key on subject line, with phase as value? Or key on distro name/perl with result and phase as value? ) -- but does it scale well? (See MJD's article) - Or use sorted file with Search::Dict(?) -- (prefer this option, keeps search for non-existant line fast; insertion is a just a few block writes and a rename.) If we do this, need to put distro name first to make "have_tested()" easier to write - Use filesystem to index -- one file per distname? hash with directories to keep number of files/directory down? - Or flat file per perl/archname/osver (usually constant) - use File::ReadBackwards for searches on flat file - Add interactive config for editor? - Improve test coverage for utility subs and error handling - Check email addresses for validity (cf. Email::Valid, etc.) - Add other Config items like 'make' to report context - heuristics for missing library files --> discard report ?? - figure out how to support color output from Test::Harness 3.0 -- probably set an environment variable to get them to pass color strings to the pipe and then strip color escape codes from the teed file. # Probably won't implement - add timeout to EU::MM prompts (RT#28034) - remove File::Temp as a build_requires dependency - send duplicate report if using "report" (?) or "force" (?) README100644000765000024 2153714423611161 14341 0ustar00garustaff000000000000CPAN-Reporter-1.2019NAME CPAN::Reporter - Adds CPAN Testers reporting to CPAN.pm VERSION version 1.2019 SYNOPSIS From the CPAN shell: cpan> install Task::CPAN::Reporter cpan> reload cpan cpan> o conf init test_report Installing Task::CPAN::Reporter will pull in additional dependencies that new CPAN Testers will need. Advanced CPAN Testers with custom Test::Reporter::Transport setups may wish to install only CPAN::Reporter, which has fewer dependencies. DESCRIPTION The CPAN Testers project captures and analyzes detailed results from building and testing CPAN distributions on multiple operating systems and multiple versions of Perl. This provides valuable feedback to module authors and potential users to identify bugs or platform compatibility issues and improves the overall quality and value of CPAN. One way individuals can contribute is to send a report for each module that they test or install. CPAN::Reporter is an add-on for the CPAN.pm module to send the results of building and testing modules to the CPAN Testers project. Full support for CPAN::Reporter is available in CPAN.pm as of version 1.92. GETTING STARTED Installation The first step in using CPAN::Reporter is to install it using whatever version of CPAN.pm is already installed. CPAN.pm will be upgraded as a dependency if necessary. cpan> install CPAN::Reporter If CPAN.pm was upgraded, it needs to be reloaded. cpan> reload cpan Configuration If upgrading from a very old version of CPAN.pm, users may be prompted to renew their configuration settings, including the 'test_report' option to enable CPAN::Reporter. If not prompted automatically, users should manually initialize CPAN::Reporter support. After enabling CPAN::Reporter, CPAN.pm will automatically continue with interactive configuration of CPAN::Reporter options. cpan> o conf init test_report Users will need to enter an email address in one of the following formats: johndoe@example.com John Doe "John Q. Public" Users that are new to CPAN::Reporter should accept the recommended values for other configuration options. Users will be prompted to create a *Metabase profile* file that uniquely identifies their test reports. See "The Metabase" below for details. After completing interactive configuration, be sure to commit (save) the CPAN configuration changes. cpan> o conf commit See CPAN::Reporter::Config for advanced configuration settings. The Metabase CPAN::Reporter sends test reports to a server known as the Metabase. This requires an active Internet connection and a profile file. To create the profile, users will need to run "metabase-profile" from a terminal window and fill the information at the prompts. This will create a file called "metabase_id.json" in the current directory. That file should be moved to the ".cpanreporter" directory inside the user's home directory. Users with an existing metabase profile file (e.g. from another machine), should copy it into the ".cpanreporter" directory instead of creating a new one. Profile files may be located outside the ".cpanreporter" directory by following instructions in CPAN::Reporter::Config. Default Test Comments This module puts default text into the "TESTER COMMENTS" section, typically, "none provided" if doing interactive testing, or, if doing smoke testing that sets C<$ENV{AUTOMATED_TESTING}> to a true value, "this report is from an automated smoke testing program and was not reviewed by a human for accuracy." If C is configured to allow editing of the report, this can be edited during submission. If you wish to override the default comment, you can create a file named C in the configuration directory (typically ".cpanreporter" under the user's home directory), with the default comment you would like to appear. Note that if your test is an automated smoke test (C<$ENV{AUTOMATED_TESTING}> is set to a true value), the smoke test notice ("this report is from an automated smoke testing program and was not reviewed by a human for accuracy") is included along with a blank line before your C, so that it is always possible to distinguish automated tests from non-automated tests that use this module. Using CPAN::Reporter Once CPAN::Reporter is enabled and configured, test or install modules with CPAN.pm as usual. For example, to test the File::Marker module: cpan> test File::Marker If a distribution's tests fail, users will be prompted to edit the report to add additional information that might help the author understand the failure. UNDERSTANDING TEST GRADES CPAN::Reporter will assign one of the following grades to the report: * "pass" -- distribution built and tested correctly * "fail" -- distribution failed to test correctly * "unknown" -- distribution failed to build, had no test suite or outcome was inconclusive * "na" --- distribution is not applicable to this platform and/or version of Perl In returning results of the test suite to CPAN.pm, "pass" and "unknown" are considered successful attempts to "make test" or "Build test" and will not prevent installation. "fail" and "na" are considered to be failures and CPAN.pm will not install unless forced. An error from Makefile.PL/Build.PL or make/Build will also be graded as "unknown" and a failure will be signaled to CPAN.pm. If prerequisites specified in "Makefile.PL" or "Build.PL" are not available, no report will be generated and a failure will be signaled to CPAN.pm. PRIVACY WARNING CPAN::Reporter includes information in the test report about environment variables and special Perl variables that could be affecting test results in order to help module authors interpret the results of the tests. This includes information about paths, terminal, locale, user/group ID, installed toolchain modules (e.g. ExtUtils::MakeMaker) and so on. These have been intentionally limited to items that should not cause harmful personal information to be revealed -- it does *not* include your entire environment. Nevertheless, please do not use CPAN::Reporter if you are concerned about the disclosure of this information as part of your test report. Users wishing to review this information may choose to edit the report prior to sending it. BUGS Using command_timeout on Linux may cause problems. See Please report any bugs or feature using the CPAN Request Tracker. Bugs can be submitted through the web interface at When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. SEE ALSO Information about CPAN::Testers: * CPAN::Testers -- overview of CPAN Testers architecture stack * -- project home with all reports * -- documentation and wiki Additional Documentation: * CPAN::Reporter::Config -- advanced configuration settings * CPAN::Reporter::FAQ -- hints and tips SUPPORT Bugs / Feature Requests Please report any bugs or feature requests through the issue tracker at . You will be notified automatically of any progress on your issue. Source Code This is open source software. The code repository is available for public review and contribution under the terms of the license. git clone https://github.com/cpan-testers/CPAN-Reporter.git AUTHOR David Golden CONTRIBUTORS * Alexandr Ciornii * Breno G. de Oliveira * Christian Walde * David Cantrell * Ed J * Graham Knop * James E Keenan * J. Maslak * José Joaquín Atria * Kent Fredric * Matthew Musgrove * Patrice Clement * Reini Urban * Scott Wiersdorf * Slaven Rezic COPYRIGHT AND LICENSE This software is Copyright (c) 2023 by David Golden. This is free software, licensed under: The Apache License, Version 2.0, January 2004 Changes100644000765000024 13247514423611161 15000 0ustar00garustaff000000000000CPAN-Reporter-1.2019Revision history for Perl module CPAN::Reporter 1.2019 2023-05-01 03:14:19+02:00 Europe/Paris [ADDED] - Record whether perl was built with taint support enabled or not - Include Test2 version in toolchain report - snip in the middle of the log, not a the end, so you get potentially more interesting data [CHANGED] - replaced IO::CaptureOutput with Capture::Tiny - Eliminate dependency on File::Copy::Recursive. 1.2018 2016-06-21 15:05:12-04:00 America/New_York [CHANGED] - Expand list of environment variables included in reports 1.2017 2016-03-02 15:49:43-05:00 America/New_York [CHANGED] - Distributions that appear to be in a Perl6/ directory are not graded and reports are discarded. 1.2016 2016-02-28 22:39:04-05:00 America/New_York [FIXED] - Improve prerequisite version detection for dynamic versions - Add support for static Config like cperl and XSConfig 1.2015 2015-08-21 17:53:31-04:00 America/New_York - Allow custom comment strings to be used as the default comment, using comment.txt in the config directory [JMASLAK] 1.2014 2015-04-06 12:08:28-04:00 America/New_York - no changes from 1.2013-TRIAL 1.2013 2015-03-29 21:52:11-04:00 America/New_York (TRIAL RELEASE) [ADDED] - Added experimental option to save output of hanging modules [CHORNY] - Added experimental option to save list of hanging modules [CHORNY] [CHANGED] - C::R::PrereqCheck will read <> before checking modules [FIXED] - Fixed incorrect report grade edge case [CHORNY] - Fixed tests for Perls on Windows with spaces in the path - Added Dancer::Plugin::FlashNote to list of prereq-check conflicts [TESTING] - Tests for C::R::PrereqCheck added 1.2011 2014-03-16 22:27:56+01:00 Europe/Paris [ADDED] - Added support for future optional prerequisite reporting when CPAN.pm supports it [CHANGED] - Moved test distributions into corpus/ to avoid repetitive tarball unpacking - Modernized distribution meta and support files 1.2010 2013-04-12 15:35:38 Europe/London [NEW FEATURES] - new option 'retry_submission' tries to send the report one extra time in case it fails. Defaults to undef (don't retry) (Patch by Alexandr "chorny" Ciornii) 1.2009 2012-12-18 16:08:37 America/New_York [BUG FIXES] - Expanded prerequisite load check skip to all Acme::* modules; prereqs still need to be installed and of sufficient version, but we don't check that Acme modules load without error to avoid side effects. 1.2008 2012-12-15 07:26:11 America/New_York [BUG FIXES] - Don't try to check if Acme::Bleach can be loaded if it's listed as a prereq 1.2007 2012-12-10 15:13:22 America/New_York [BUG FIXES] - Recognize another form of "Perl is too low" message [CHORNY] 1.2006 2012-04-10 18:44:20 America/New_York [BUG FIXES] - Changed how CPAN::Reporter::PrereqCheck attempts to load modules to avoid module reloading, which caused some prereqs to show up as 'broken' [rt.cpan.org #76394 and #75559] [OTHER] - Bumped IPC::Cmd prereq to 0.76 to avoid failures on some platforms 1.2005 2012-03-02 13:21:36 EST5EDT [BUG FIXES] - Canonicalise the config path returned by bsd_glob [rt.cpan.org #70504] [Kent Fredric] 1.2004 2012-02-13 16:25:07 EST5EDT [BUG FIXES] - Fix bug in testing tilde expansion on Windows [rt.cpan.org #72051] 1.2003 2011-12-06 11:07:04 EST5EDT [BUG FIXES] - Fix bug in transport class validation to allow multi-level class names [rt.cpan.org #73045] 1.2002 2011-08-10 17:52:08 America/New_York [BUG FIXES] - Fix failing tests on systems without Test::Reporter::Transport::Metabase - Minor test cleanups for use with 'prove' 1.2001 2011-08-07 05:05:58 America/New_York [BUG FIXES] - Fix failing test on Windows due to glob expansion of "~" [Christian Walde] 1.20 2011-08-05 13:17:20 America/New_York [BUG FIXES] - Removed Test::Reporter::Transport::Metabase as a prerequisite. New testers are recommended to install Task::CPAN::Reporter instead of CPAN::Reporter. 1.19_04 2011-06-29 17:39:25 America/New_York [NEW FEATURES] - Metabase profile generation will use as much of the provided email_from parameter as possible and will generate a random secret API key. If user provides email_from in a standard form like C<< "John Q. Public" >> then profile generation is entirely automatic without additional prompts from metabase-profile [David Golden] [DOCUMENTATION] - Swapped in Task::CPAN::Reporter in the SYNOPSIS [David Golden] [BUG FIXES] - Expands "~" into user directory before attempting to locate 'relative' pathname in .cpanreporter directory [David Golden] 1.19_03 2011-06-28 14:44:19 America/New_York [NEW FEATURES] - During configuration, if 'Metabase' is the requested transport and a Metabase profile file is not found, configuration will offer to run metabase-profile to create it. [David Golden] - For Metabase transport (only), the 'id_file' may have a relative file path, treated as relative to the .cpanreporter directory. [David Golden] [BUG FIXES] - updated CPAN::Reporter to go with Metabase by default, instead of the deprecated SMTP transport system. This provides more up-to-date information for new testers on how to setup their systems and addresses RT#64316 (and maybe also RT#61735) [Breno G. de Oliveira] - Replaced use of Tee.pm with Capture::Tiny as the two don't play well together on some systems. [Christian Walde] [DOCUMENTATION] - Docs have been substantially re-written to reflect the new HTTP-based transport instead of email-based transport. [Breno G. de Oliveira and David Golden] 1.1902 2011-01-28 15:22:35 EST5EDT [BUG FIXES] - Updated Tee prereq to 0.14 to fix an instability on Windows 1.1901 2011-01-24 20:23:23 EST5EDT - Fixes some space and backslash escaping for Windows [Christian Walde] 1.1900 2011-01-21 10:55:28 EST5EDT - No changes from 1.18_06 1.18_06 2010-12-07 05:18:51 EST5EDT Fixed: - Reports with a "can't spawn" error from TAP::Parser::Iterator::Process are discarded instead of reporting FAIL Other: - CPAN::Reporter is now released using Dist::Zilla. This required some changes to various files help dzil find/skip various bits of data. It should have no runtime effect. 1.18_05 Sun Oct 24 21:25:22 EDT 2010 Fixed: - Fixed error in calling prerequisite detection script when there are spaces in the path [RURBAN] 1.18_04 NOT RELEASED TO CPAN Changed: - Executed processes are given their own process group and timeouts are now handled by sending SIGKILL to the entire child process group. This is an attempt to address RT#61912 1.1803 Thu Sep 30 21:49:10 EDT 2010 Fixed: - Fixed t/13_record_command.t to reflect removal of Proc::ProcessTable as a conditional dependency and fixed a resulting bug in the test - Removed mention of Proc::ProcessTable in CPAN::Reporter::Config 1.1802 Wed Sep 29 23:19:15 EDT 2010 Changed: - Given the migration to CT2.0, the maximum report length before truncation has been increased from 50 to 1,000 kB. - Removed dependency on Proc::ProcessTable for using a command timeout on non-Win32 platforms. 1.1801 Fri Sep 10 16:34:29 EDT 2010 Changed: - Default config directory now uses File::HomeDir->my_home on windows instead of ->my_documents. If that directory doesn't exist, it will fall back to ->my_documents. 1.1800 Mon Jul 26 16:02:06 EDT 2010 Changed: - "sending test report..." message now shows transport method, not the old email list address for less confusion when using non-email transports - Enhances missing "email_from" prompt to clarify why an email is still needed under non-email transports for legacy compatibililty 1.1711 Wed Feb 17 13:52:14 EST 2010 Bugs fixed: - Tests for "no make test" were failing due to internationalization of the error message. Rather than try to interpret every possible make error message, CPAN::Reporter now just looks inside the Makefile for a "test" target. Hopefully, that will prove more robust. 1.1710 Wed Feb 10 10:30:51 EST 2010 Bugs fixed: - Tests for "no make test" were failing on some systems due to the incredibly wide range of error messages possible from make/nmake/dmake on various systems. The error message check is now even more liberal. 1.1709 Mon Feb 1 22:39:59 EST 2010 Bugs fixed: - Fixed PrereqCheck for modules like "if.pm" that could be confused with Perl syntax (RT#53477 by Serguei Trouchelle) - Added PrereqCheck special-case for Module::Install and improved diagnostics when prereqs are missing or too low (RT#51257) - Distributions with no 'make test' target should be UNKNOWN, not FAIL (RT#52139) - Improved detection of Test::Reporter capable of setting 'distfile' parameter Documentation changes: - Added 'Port' example for transport options - Adopted new format for Changes 1.1708 Mon Jun 1 23:31:58 EDT 2009 *** Emergency fix -- 1.1706/1.1707 can prevent subsequent module *** *** installation if installed with an older Test::Reporter. *** *** Disable test reporting (From CPAN, 'o conf test_report 0') *** *** and install CPAN::Reporter 1.1708. Then re-enable test *** *** reports. *** - Fixed: in the case where an old Test::Reporter without the distfile() method is installed, CPAN::Reporter would crash and prevent installation of modules (including newer Test::Reporter); now checks for a Test::Reporter 1.1707 Sun May 31 21:44:07 EDT 2009 - Prereq: bumped Test::Reporter to 1.54 1.1706 Sun May 31 14:00:43 EDT 2009 - Changed: URL of CPAN Testers wiki is now wiki.cpantesters.org - Added: support for setting 'distfile' parameter for test reports if supported by Test::Reporter (1.53_01+) 1.1705 Tue Jan 20 10:51:24 EST 2009 - Docs: CPAN Testers website updated to www.cpantesters.org (David Westbrook) 1.1704 Sun Dec 7 06:24:07 EST 2008 - Fixed: protect CPAN::Reporter tests from older versions of itself - Prereq: bumped Devel::Autoflush to 0.04 and CPAN to 1.9301 1.1703 Fri Dec 5 23:06:20 EST 2008 - Changed: Devel::Autoflush only added to PERL5OPT when capturing output from Makefile.PL or Build.PL - Prereq: bumped Devel::Autoflush to 0.03 for various fixes 1.1702 Sat Sep 13 07:20:04 EDT 2008 *** Emergency fix -- 1.1701 tickled a new Test::Harness bug *** - Changed: reverted to old -I and -M flag order in PERL5OPT; -I flag only added on Perl 5.8+; this should still fix Perl < 5.8 that can only take a single flag without provoking the T::H bug 1.1701 Thu Sep 11 23:56:41 EDT 2008 - Fixed: changed order of -I and -M flags in PERL5OPT to have -M first (since Perl 5.6.2 only supports a single flag); 5.6.2 testers may yet again see complaints about missing Devel::Autoflush when authors call 'perl' instead of $^X in tests (oh, well...) - Changed: bumped Test::Reporter prereq to 1.50 1.17 Sat Sep 6 19:35:44 EDT 2008 - Changed: In line with changes to CPAN Testers grade definitions, failures during the PL or make/Build phase will now be reported as UNKNOWN instead of FAIL - Removed: In line with the CPAN Testers decision to no longer have individual testers send reports to authors, the "cc_author" option has been removed - Fixed: "Build -j3" type errors are detected and reports discarded - Fixed: Makefile out of date vs Makefile.PL errors detected and discarded - Docs: updated FAQ 1.16_51 Wed Jul 16 12:41:48 EDT 2008 - Fixed: t/11_env_config was failing when tested under CPAN::Reporter due to PERL5OPT manipulations 1.16_50 Wed Jul 16 09:41:20 EDT 2008 - Added: restored "-I" for PERL5OPT, but to a temporary lib directory containing a copy of Devel::Autoflush. - Fixed: enviroment variables section of report now reflects PERL5OPT as used during build and testing 1.1601 Sat Jul 5 09:37:14 EDT 2008 - Fixed: reverted 1.15_56 PERL5OPT changes; Devel::Autoflush INC path no longer added with "-I" as it causes old modules to be found during testing. Testers will have to live with authors complaining about Devel::Autoflush missing when authors call 'perl' instead of $^X - Fixed: timeout support on *nix checks for *both* Proc::Killfam and Proc::ProcessTable to protect against unauthorized copies of only Proc::Killfam bundled in distributions like Tk-ExecuteCommand 1.16 Fri Jul 4 09:14:52 EDT 2008 - No changes since 1.15_56 - Summary of major features/fixes since 1.15: - Added: support for 'configure_requires' in META.yml (adds Parse::CPAN::Meta as dependency) - Fixed: uses Devel::Autoflush to ensure buggy *.PL files that prompt without a newline are always visible through the 'tee' pipe - Fixed: on Unix, changed command timeout approach to avoid disconnecting STDIN from the terminal; timeouts now require Proc::Killfam on *nix platforms 1.15_56 Thu Jun 19 22:19:33 EDT 2008 - Fixed: when multiple versions of perl are installed, distributions that called 'perl' during testing instead of '$^X' would die trying to load Devel::Autoflush if the first perl in PATH didn't have Devel::Autoflush installed; fixed by added -I flag to PERL5OPT with the path to Devel::Autoflush to ensure it can be found; (calling 'perl' is actually a subtle testing bug, but this way it doesn't look like it's the tester's fault) - Documented: removed suggestion to subscribe to cpan-testers since that no longer is necessary now that cpan-testers is just a drop-box (noted by Jose Luis Martinez) 1.15_55 Mon Jun 9 08:11:01 EDT 2008 - Fixed: catch META.yml parse failures from Parse::CPAN::Meta (Reported by Andreas Koenig) 1.15_54 Fri Jun 6 14:06:57 EDT 2008 - Fixed: would disconnect from terminal input when running interactively with an inactivity timeout; fixed by avoiding use of setpgrp(), but now requires Proc::Killfam to support inactivity timeouts on non Win32 platforms. (Bug reported by Andy Armstrong) 1.15_53 Thu Jun 5 06:37:13 EDT 2008 - Fixed: PERL5OPT could was being set with a leading space, which can break distributions being tested under Test::Harness 1.15_52 Wed Jun 4 22:23:39 EDT 2008 - Fixed: t/11_env_config.t had a bug that would fail incorrectly if an environment variable had a leading space 1.15_51 Wed Jun 4 17:57:42 EDT 2008 - Fixed: t/13_record_command.t relative path tests are incompatible with Devel::Autoflush; removed the broken tests 1.15_50 Tue Jun 3 12:13:12 EDT 2008 - Added: on FAIL reports, now checks for missing configure_requires and discards the report if configure_requires is not satisfied. (Adds Parse::CPAN::Meta as dependency.) - Fixed: some *.PL files prompt without autoflush, which works normally, but appears to silently hang when piping to a tee. CPAN::Reporter now uses Devel::Autoflush in PERL5OPT to always turn on autoflush - Fixed: distributions with odd names wouldn't be recorded in history; now they are recorded as 'DISCARD' 1.15 Mon May 19 11:21:47 EDT 2008 - Changed: now requires Test::Reporter 1.40 - No other changes from 1.14_xx series 1.14_04 Thu Apr 17 06:37:26 EDT 2008 - Documented: added section on transport config option 1.14_03 Thu Apr 17 06:37:26 EDT 2008 - Uploaded without Changes file updated 1.14_02 Sun Apr 6 09:45:39 EDT 2008 - Changed: improved diagnostics messages for 'transport' failures 1.14_01 Sat Apr 5 18:30:44 EDT 2008 - Changed: if 'transport' configuration option is not valid according to Test::Reporter, no report will be sent instead of falling back to Net::SMTP 1.13 Mon Mar 24 09:22:44 EDT 2008 - Changed: Build.PL or Makefile.PL that returns without error but does *not* create either 'Makefile' or 'Build' will be marked as 'DISCARD' for the PL phase instead of 'PASS'. - Fixed: Prereq check would be confused if loading modules also printed anything to STDOUT (somehow CPAN.pm is a culprit); added "select DEVNULL" before requiring modules as a workaround 1.12 Mon Mar 10 08:55:48 EDT 2008 - Added: Win32::FsType() to special variables section of report - Added: diagnostic warning if PrereqCheck output can't be parsed 1.11 Mon Feb 25 18:47:03 EST 2008 - Bug fix: successful PL's where prereqs happen not to be satisfied were mistakenly being marked as 'DISCARD' for the PL phase. Fixed so that PL's that PASS will stay that way regardless of prerequisites. (This does not prevent a later make or test failure from being downgraded, - Bug fix: skipfiles patterns should match case-insensitive (Cantrell); also, documented lack of starting anchor - Bug fix: command_timeout option would not accept zero as valid; now zero is a valid option and disables command_timeout - more minor boilerplate tweaks 1.10 Mon Feb 25 10:07:28 EST 2008 I hereby dub 1.10 as the "I hate Windows" release - Bug fix (sort of): On Win32, child processes were not timing out. Changed from Win32::Process to Win32::Job to fix that. However, discovered that process termination on Win32 can deadlock in some cases, so timeout testing on Win32 will now skip unless $ENV{PERL_AUTHOR_TESTING} is set. Added warning to documentation. - Bug fix: On a Win32 virtual machine (VirtualBox), handles for output capture were not inherited by child processes, which caused Test::Harness to crash for some reason. 1.09 Mon Feb 18 22:10:55 EST 2008 - Simplified and shortened boilerplate - Bug fix (minor): better detection of make vs Build for progress messages - Test fix: skip interrupt testing on MSWin32 if Win32::Process is not installed 1.0801 Sun Feb 10 00:27:05 EST 2008 - Test fix: adjust timeout timings in t/14_command_timeout.t to try to avoid failures on heavily loaded machines 1.08 Sat Jan 26 18:52:45 EST 2008 - No changes from 1.07_06 (seems to pass smoke tests) - Summary of new features since 1.06: - Added have_tested() function to CPAN::Reporter::History - Added 'cc_skipfile' and 'send_skipfile' advanced config options - Added 'command_timeout' advanced config option - Added support for PERL_CPAN_REPORTER_DIR and PERL_CPAN_REPORTER_CONFIG environment variables 1.07_06 Fri Jan 25 11:27:28 EST 2008 - Added 'command_timeout' config to halt commands after a period of time - Added detection of commands killed with a signal; reports are discarded (N.B. this may change in a future version) - Bug fix: processes timing out could still hang with child processes (killing 'make test' still leaves the harness running); fixed by making 'make test' its own process group and killing the process group; hoping that's portable across non-Win32; Win32 timeouts use Win32::Process and do the right thing already - Downgraded lots of progress messages from CPAN's 'mywarn' to 'myprint' (from red to blue if you use CPAN's colored output) 1.07_05 Thu Jan 24 08:27:48 EST 2008 - Added PERL_CPAN_REPORTER_DIR and PERL_CPAN_REPORTER_CONFIG environment variables to specify alternate locations for default configuration directory and file (RT#30314) - Removed File::Temp as a full prerequisite; now only used in testing (Requested by Adam Foxson to extract features to CPAN::Testers::*) 1.07_04 Sun Jan 20 22:06:56 EST 2008 - Test fix: stopping cc on blead broke lots of other tests. Fixed those. Built my own blead perl so I can actually check these things in the future instead of relying on Andreas' blead smoking - Test fix: testing skipfile wasn't being created properly on Perl 5.005 1.07_03 Sat Jan 19 22:16:44 EST 2008 - Test fix: set sample history file writeable after copy 1.07_02 Sat Jan 19 20:33:55 EST 2008 - Added have_tested() function to CPAN::Reporter::History; provide ability to search the CPAN::Reporter history file - Bug fix: PL files that warned "OS Unsupported" and exited with 0 will now be flagged as NA; this bends the CPAN Testers "rules" slightly, but "OS Unsupported" is a hack anyway, so this should help things DWIM - Test fix: more changes to timeout testing to avoid false failures - Authors will never be CC'd on reports when running maint/blead perl (anything with $Config{perl_patchlevel} set) - Reports discarded due to missing prerequisites will now be recorded in the history file with a 'grade' of DISCARD (unless a duplicate DISCARD already exists) - Changed "edit_report" prompt to clarify this can be used to review reports in addition to just editing them - Shortened duplicate report warning to fit on one line 1.07_01 Tue Jan 8 01:41:02 EST 2008 - Added "cc_skipfile" and "send_skipfile" advanced config options to specify a text file of regex patterns; if a distribution ID ('AUTHOR/Dist-Name-0.01.tar.gz') matches any pattern in the file, the author will not be copied on the report (cc_skipfile) or no reports will be sent at all (skip_sendfile) 1.0602 Tue Dec 25 08:59:07 EST 2007 - Test fix: a timeout test would sometimes appear to fail on a highly loaded system; changed the runtime and timeout timings to try to prevent false failures; added better diagnostic output 1.0601 Tue Dec 11 12:19:25 EST 2007 - Test fix: Test::Harness 3.05 fixed a long standing bug; the fix broke our tests 1.06 Thu Nov 15 14:17:04 EST 2007 - Bug fix: if older versions of a module are in multiple locations in @INC, CPAN::Reporter could detect the older version instead of the newer one; fixed in CPAN::Reporter::PrereqCheck (RT#30345; additional investigation by Andy Armstrong) - Bug fix: "our $VERSION" check still wasn't working on 5.005; now fixed (reported by Slaven Rezic). Note, this situation only applies to Module::Build <= 0.2808, where Build.PL dies before a legitimate "require => { perl => 5.006 }" is processed. (Makefile.PL does not die in this situation and Makefile.PL has no way of signaling a required perl version other than "use 5.006" or equivalent in the Makefile.PL) - Bug fix: wasn't printing Test::Reporter error message if a report couldn't be sent (RT#30730 by BLOONIX) - Changed FAIL report boilerplate about CPAN::Testers wiki to be more explicit that the wiki teaches how to deal with dependencies, OS, etc. (suggested by Olly Betts) 1.05 Tue Nov 6 14:41:48 EST 2007 - Added checks for Makefile.PL/Build.PL dying early on Perl < 5.6 if modules define their version using "our $VERSION"; such cases will be graded NA (RT#30299; report and partial patch from Slaven Rezic) - Added author's email address to the prompt question for whether to CC the author. Also fixed typo in the prompt. (suggested by Slaven Rezic) - Added "CPAN::Reporter" consistently as a prefix to all console messages to distinguish them from messages from CPAN.pm. Noisy, but helps track errors/complaints to the right source. - Bug fix: on first installation, "reload cpan" might load CPAN::Reporter when an old version File::Temp is already loaded; added an explicit version check on File::Temp (reported by Andreas Koenig) 1.04 Fri Oct 26 06:56:32 EDT 2007 - Bug fix: temp files were being created in the current directory, not the File::Spec->tmpdir() directory; this broke distributions that used their own distribution directory for signature or MANIFEST checks 1.03 Wed Oct 24 17:13:59 EDT 2007 - Added a check for prerequisites that are present but fail to load; in such a case the prereq "have" field will show "broken" (e.g a dependency of that module is missing) - Refactored prerequisite checking code into a separate modulino CPAN::Reporter::PrereqCheck to cut down on excessive tempfile use and simplify testing - Added name templates for all tempfiles to help identify leakage or left-over files if tests are interrupted. All names are like CR-ZZ-XXXXXXXX, where ZZ is unique to each File::Temp call and X's are a random suffix - Testing bug fix: in the rare case where Module::Build is present but broken, we would only skip Build.PL tests once instead of always 1.02 Sun Oct 14 08:57:38 EDT 2007 - Bug fix: shell quotes in command passed to record_command() were not being properly escaped in creation of the wrapper script (found by Andreas Koenig) - Bug fix: wasn't detecting Perl version too low during make/Build phase. Reports were improperly graded as 'FAIL' instead of 'NA' (found by Slaven Rezic and David Cantrell) - Bug fix: wasn't detecting missing prerequisites during "make" phase and FAIL reports were being sent that should have been discarded (found by Michel Rodriguez and David Cantrell) 1.01 Sat Oct 13 03:21:40 EDT 2007 - Bug fix: no prompt for sending reports was being shown if advanced send_*_report options were set. (Found by David Cantrell) - Bug fix: was not detecting Module::Install's perl version warning (found by Slaven Rezic) 1.00 Wed Oct 10 20:39:42 EDT 2007 *** New major release -- API changes and other enhancements *** Summary of major changes from 0.XX series: * Added support for reporting for *.PL and make/Build stages; bumped CPAN.pm prerequisite to 1.9203 to take advantage of this support * Added support for the forthcoming Test::Harness 3.00 * Changed the name and format of the history file of sent reports to track history by PL/make/test phase. Old history.db will be automatically upgraded to new reports-sent.db. * Moved 'cc_author' and 'send_duplicates' options from interactive to advanced (manual) configuration; defaults are strongly recommended * Bumped Test::Reporter prereq to 1.34 for transport() method and set default transport to Net::SMTP on all platforms Additional minor new change in 1.00: - Added CPAN Testers wiki URL to explanation paragraph for FAIL reports (request by Slavan Rezic) 0.99_15 Mon Oct 8 08:33:56 EDT 2007 This release is dedicated to Slaven Rezic for boldly smoking with the pre-release of Perl 5.005_05. - Work around missing 5.005 Fcntl constants (noted by Slaven Rezic) - Fix bug detecting perl version failure in test output (found by Slaven Rezic while testing Sub::Uplevel on 5.00505) - Fix bug detecting OS unsupported in test.pl and make - Test output truncated at 50K to ensure reports will be accepted by perl.org's MX and to avoid excessive output in general (MX limitation noted by Slaven Rezic) - Added documentation note in History.pm that all methods are currently private - Removed API.pm and FAQ.pm from MANIFEST and tarball -- these are just source files for API.pod and FAQ.pod generated with Pod::WikiDoc 0.99_14 Tue Oct 2 14:49:40 EDT 2007 * Bumped CPAN.pm prereq to 1.9203 -- fixes a bug where make/build continues even if Makefile/Build is missing, causing FAIL reports for modules that exit(0) without generating a Makefile. - Set transport() default to Net::SMTP; ensures CPAN::Reporter can work out-of-the-box on systems that happen to have Mail::Send and a broken sendmail installation - eliminated several Perl::Critic level 4-5 complaints - added some entries to the FAQ 0.99_13 Thu Sep 27 06:24:00 EDT 2007 * Bump Test::Reporter prereq to 1.34 for transport() method. Added "transport" advanced configuration option. (Requested by Andreas Koenig) - Improved robustness of conversion of old history files on Win32 for really old CPAN::Reporter history formats - Minor report format tweaks 0.99_12 Sun Sep 23 13:14:08 EDT 2007 * Bumped CPAN.pm prereq to 1.92 (full support for PL/make) - Reordered report sections to move program output to immediately after tester comments; this keeps most relevant information at the top and prereqs and other context follow - Added perl version to the report intro paragraph since otherwise it doesn't appear until the "perl -V" output at the end of the report - Compressed UID/EUID variables to a single line in the report - Made report language less 'test' specific, since we can also report on PL or make failures - Changed the way perl version is stringified for history file entries to workaround an old bleadperl bug; (a "better safe than sorry" fix) (Reported by Andreas Koenig) - Cleans up temp directories in testing more frequently 0.99_11 Fri Sep 21 17:02:18 EDT 2007 - Fallback to "make test" or "Build test" exit value when output parsing fails. This supports custom testing in Makefile.PL or Build.PL (Reported on Prima by Dmitry Karasik) 0.99_10 Tue Sep 11 17:29:18 EDT 2007 - Added advanced options "send_PL_report", "send_make_report" and "send_test_report" to override "send_report" for individual phases (requested by David Cantrell) 0.99_09 Mon Sep 10 09:50:57 EDT 2007 - Fix test failure on bleadperl 0.99_08 Sat Sep 8 18:07:08 EDT 2007 * History file of sent reports has a new name ('reports-sent.db') and a new format with phase of testing for report ('PL', 'make', 'test') - More robust check for Test::Harness 2.99_01 (works even with out-of-date releases of version.pm) - More refactoring of config/history functions into separate modules 0.99_07 Wed Sep 5 18:20:37 EDT 2007 - Skips inactivity timeout on Win32 without Win32::Process >= 0.10 (bug found by Corion) - Bails out on Test::Harness 2.99_01 (not supported) 0.99_06 Wed Sep 5 16:56:23 EDT 2007 - Added support for new message format from Test::Harness alpha (2.99_02) - Changed grading for test files with no output from FAIL to UNKNOWN to harmonize with new Test::Harness approach - Falls back to overall 'make test' exit code for success or failure if recursive Makefile.PL's are detected; File::Find added to prereqs; Bumped EU::MM prereq to 6.36 to get bug fixes for recursion and more - record_command() wrappers do better error checking for exec failures - Bumped File::Copy::Recursive dependency to 0.35 (fixes Win32 bug) - More defensive test coding - changed to the Apache License, version 2.0; (it's clearer, relicensable, and is explicit about contributions) 0.99_05 Mon Aug 27 16:16:50 EDT 2007 - Fixed copy/paste typo that caused testing to fail; (serves me right for rushing out 0.99_04 without using my normal release-testing script) 0.99_04 Mon Aug 27 07:40:59 EDT 2007 - Merged changes from 0.4801 0.4801 Mon Aug 27 07:30:24 EDT 2007 - File::Copy::Recursive 0.34 is badly broken on Windows, causing our tests to fail; added an "xcopy" workaround 0.99_03 Fri Aug 10 12:03:07 EDT 2007 - Fixed broken PL tests when Module::Build is not available - Tweaked grade result message printed to screen - Noted in Pod that CPAN 1.91_53 is required for full support - Reordered Changes to be chronological 0.48 Tue Aug 7 16:28:42 EDT 2007 - Bumped Test::More prereq to 0.62 (from 0.99_02) - More portable directory checks in test helper module - Cleaned up DOS/unix line endings in many files 0.99_02 Tue Aug 7 06:54:59 EDT 2007 - Author tests (e.g. pod/pod-coverage) moved to 'author_t' directory - Module::Build subclass used for development moved to inc - Pulled forward maintenance changes from 0.47_01 - Bumped Test::More prereq to 0.62 0.47_01 Sat Aug 4 00:09:54 EDT 2007 - Added TEMP and TMPDIR to environment variables included in report - Changed inclusion of AUTHOR_TESTING environment variable to any matching /AUTHOR_TEST/ - Changed how "Build.PL" is executed in tests to diagnose odd Cygwin failure; increased test diagnostics 0.99_01 Tue Jul 31 22:28:25 EDT 2007 * Major API additions and configuration changes in preparation for adding Makefile/Build.PL and make/Build support into CPAN.pm * Deprecated test() function; test() separated into record_command() and grade_test() functions to support CPAN.pm sending reports from output generated indpendently from CPAN::Reporter, e.g. CPAN.pm using Expect with distroprefs * Added record_command() to wrap and tee a system() command and return results for further evaluation in grade_*() functions; wrapping used to capture exit values that would otherwise be lost from pipe to tee; will support CPAN inactivity timouts on both *nix and Win32 * Added grade_PL() function to evaluate results of 'perl Makefile.PL' or 'perl Build.PL'; recognizes 'require 5.xxxxx' and unsupported OS error messages to be 'NA' as well as ordinary pass/fail outcomes * Added grade_make() function to evaluate results of 'make' or 'Build' * Added grade_test() function to evaluate results of 'make test' or 'Build test' (refactored from old test() function) * Removed 'cc_author' and 'send_duplicates' options from normal interactive configuration; defaults will be used unless set manually in the configuration file - separated documentation into separate API and Config files to keep documentation simple in the primary CPAN::Reporter file - added YAML & YAML::Syck to list of toolchain module versions reported (i.e. determines if META.yml is used by CPAN.pm) - began refactoring configuration code: moved configuration defaults and validation into Config.pm - fixed bug in distribution-version string creation for .tar.bz2 0.46 Tue Jul 17 22:05:50 EDT 2007 *** Significant improvements to NA report handling *** * Changes as per CPAN Testers specifications from Barbie * NA reports should now be sent to CPAN Testers instead of discarded - Tests that fail with 'OS Unsupported' or 'No support for OS' are now correctly identified as NA - FAIL/UNKNOWN grades results with unsatisfied prerequisites are discarded immediately instead of being flagged as NA - changed default configurations to automatically send NA just like PASS - interactive configuration now always shows recommended options in addition to any prior configuration - added CPAN Testers website and wiki to SEE ALSO in docs - improved tests for detecting reports sent/not-sent 0.45 Tue Jul 3 17:07:30 EDT 2007 - distribution tests that bailout now detected as FAIL instead of UNKNOWN - UNKNOWN results when prereqs are missing are downgraded to NA (just like FAIL reports with missing prereqs already were) 0.44 Sun Jun 17 22:05:46 EDT 2007 - searches through duplicate history file instead of loading as a hash - added flocking to history file read/write (and faked it for platforms that don't support flock) - duplicate history includes $Config{perl_patchlevel} if it exists 0.43 Tue Apr 24 22:55:32 EDT 2007 - enhanced duplicate tracking to include Perl version (suggested by David Cantrell) 0.42 Tue Apr 24 00:27:56 EDT 2007 - added "send_duplicates" option with default "no"; compares CPAN Testers subject lines (grade, distribution, version and platform) to previous test results and skips sending duplicate reports 0.41 Sun Mar 25 09:39:07 EDT 2007 - test reports will not be sent if the distribution name doesn't appear appear to be an actual distribution with version and archive suffix (Suggested by Barbie) - refactored tests - fixed ID format in mock CPAN::Distributions used in testing 0.40 Wed Feb 28 23:30:13 EST 2007 - eliminated Perl::Critic level 5 and (most) level 4 complaints - added defensive code in case CPAN.pm can't provide a valid Author object (Reported by David Cantrell) 0.39 Sat Feb 10 19:28:13 EST 2007 - changed prereq version testing to better match approach used by CPAN.pm - added support for Module::Build-style extended prerequisite logic (e.g. ">= N.nn, !=M.mm" etc.) 0.38 Mon Dec 4 20:39:18 EST 2006 - fixed uninitialized value warning in "Preparing test report for..." 0.37 Mon Dec 4 08:44:54 EST 2006 - fixed false result given back to CPAN.pm when config file is missing but tests passed (Reported by Andreas Koenig) 0.36 Mon Dec 4 00:20:32 EST 2006 - changed default for send_report to "no" for "na" reports to avoid sending spurious reports from prerequisites failures - customized email report intros for better help to module authors receiving a CC for various types of reports - removed email address for RT to reduce spam - Added a FAQ and example config.ini 0.35 Fri Nov 10 01:52:47 EST 2006 - fixed environment report tests for the case of undefined/empty environment variables - added support for CPAN.pm ANSI color messages and prompts 0.34 Wed Nov 8 05:39:22 EST 2006 - fixed test skip block count when Module::Build is not installed (reported by rinceWind) 0.33 Tue Nov 7 07:37:08 EST 2006 - Added Test::Harness and Test::More to the modules included as part of the toolchain version report 0.32 Tue Nov 7 01:24:14 EST 2006 - Added versions of module toolchain (e.g. CPAN, ExtUtils::MakeMaker, Module::Build, etc.) to test report - Added Pod warning about potential privacy issues from sending environment and other information as part of the test report 0.31 Mon Nov 6 13:38:57 EST 2006 - replace broken 0.30 release 0.30 Mon Nov 6 13:29:03 EST 2006 - changed report output to have a different introductory paragraph for each test grade to better clarify the meaning of 'unknown' and 'na' results from testing - added select environment variables and Perl special variables to generated report - added some addition clarifications in Pod 0.29 Sat Oct 28 13:36:26 EDT 2006 *** Backward compatibility warning: See below and 0.28_51 change log *** * Config file location on Mac OS X * Config option format and semantics for action prompts - fixed RT#22557: recursive build directories with no tests will no longer cause an "unknown" grade if tests exist at the top-level directory - changed action prompt rules; default is always no unless otherwise specified -- the suggested rule from interactive configuration has no impact on parsing - changed default action for edit_report and send_report to "no" and "yes" respectively if the grade is pass to avoid holding up successful installations. (Suggested by Michael Schwern) - changed several tests to always mock configuration directory; prevents OS X config files from being migrated early during testing. (Reported by Michael Schwern). - added explanation of grade:action pairs during configuration - added validation of grade:action pairs during configuration 0.28_51 Mon Oct 23 23:47:33 EDT 2006 *** Backward compatibility warning: configuration options have changed and config directory on OS X has changed *** - changed config directory on Mac OS X to ~/.cpanreporter instead of ~/Documents/.cpanreporter to be more like Unix; automatically moves config file if old directory is detected. (RT#22120) - changed action prompt configuration option format to support grade- specific actions (RT#21690) - fixed success/failure parsing when recursive make output is included; line parsing is now done in reverse and only the first matching line is used - changed perl version prerequisite logic; report will only be marked "na" if a perl version was explicitly set in the prerequisites; autodetection of low perl version was removed to eliminate spurious matches from recursive makes - added tests for report output format 0.28 Sun Oct 8 12:47:46 EDT 2006 - fixed test programs to force cleanup temp directories (due to bug in File::Temp) 0.27 Wed Oct 4 14:04:08 EDT 2006 *** Emergency bug fix *** - fixed fatal bug in prereq collection from some versions of CPAN.pm 0.26 Wed Oct 4 09:25:08 EDT 2006 - fixed prereq tests: requiring "0" will now pass for modules with no $VERSION defined (will show that version '0' is installed) - fixed prereq tests for version.pm and bleadperl expansion of version numbers when stringified (1.2 becomes 1.200) - bumped ExtUtils::MakeMaker prereq version to 6.26 to ensure proper globbing of t/*.t files for Test::Harness 0.25 Tue Oct 3 23:00:02 EDT 2006 - fixed prereq testing: tests are conducted in a perl subprocess to use same $ENV{PERL5LIB} as used for testing itself; necessary to support prerequisites that may be tested by CPAN.pm but not yet installed - added special logic for perl prerequisite version checks now that CPAN.pm passes it along - added tests for prereq reporting 0.24 Sun Oct 1 04:27:51 EDT 2006 *** Emergency bug fix *** - added a dummy file to t/dist/NoTestFiles/t to ensure the directory is included in the distribution manifest and tarball; otherwise NoTestFiles tests fail 0.23 Fri Sep 29 14:35:49 EDT 2006 - changed test.pl/ExtUtils::MakeMaker handling to wrap 'make test' execution with a standardized (parsable) string; does not run test.pl twice anymore (Jonathan Rockway) - added additional test distributions and added tests for diagnostic messages explaining each grade (coverage now > 90%) 0.22 Thu Sep 28 23:44:54 EDT 2006 - added support for future CPAN.pm support for separate requires and build_requires prerequisites - changed prerequisites report for easier reading and to show requires and build_requires individually, if available from CPAN.pm - changed test.pl test grading under ExtUtils::MakeMaker from output parsing to determining the success or failure of a separate run of Makefile 0.21 Thu Sep 28 07:06:30 EDT 2006 - added test.pl support with full capture of output (Tim Bunce) - added support for "NA" grade when prerequisites are not meta or Perl version is too low - refactored tests into separate files by grade 0.20 Sun Sep 24 22:45:48 EDT 2006 - fixed RT#21626: "unknown" results will now be reported to CPAN.pm as success and will not interrupt module installation (Slaven Rezic) - added support for test.pl files -- though under "make", report is based on exit code only and no output is collected - added several new tests and test distributions for greater coverage and confirming bug closure - added user feedback for test grade assigned during report generation - changed format of test report 0.19 Fri Sep 22 16:54:02 EDT 2006 - changed test IO capture to IO::CaptureOutput (fixes test issues for Perl < 5.8) (Andreas Konig) 0.18 Thu Sep 21 21:03:57 EDT 2006 - added workaround for a bizarre VERSION() method confict when Module::Signature is installed on older Perls (Andreas Konig) - added note about location of config files for Mac OS X (SKUO) - updated "Getting Started" Pod now that CPAN 1.88 is out 0.17 Sat Sep 9 07:11:08 EDT 2006 - changed t/03_test_report.t to skip Module::Build tests if Module::Build is not installed 0.16 Fri Sep 8 07:19:25 EDT 2006 - fixed file mode bug in t/02_config_file_t (Slaven Rezic) - added first regression tests for pass/fail 0.15 Wed Sep 6 19:23:32 EDT 2006 - fixed broken test() -- all tests were reporting failed 0.14 Wed Sep 6 15:53:52 EDT 2006 - added configure() for config file generation and interactive config - removed automatic config file generation from the test() function - updated getting started documentation to reflect CPAN.pm 'o conf init test_report' syntax (as of 1.87_59) and new interactive config feature of CPAN::Reporter - added the 'fail' config value; equivalent to 'yes' if a test failed and 'no' otherwise - changed "cc_author" default to "fail" - added error checks and testing for config file generation 0.13 Tue Aug 29 06:31:38 EDT 2006 - added slightly more verbose progress messages, including for CC's and for reports not sent - minor documentation improvements 0.12 Sat Aug 26 19:05:54 EDT 2006 - updated docs to indicate that CPAN 1.87_57 supports CPAN::Reporter 0.11 Sat Aug 26 12:20:32 EDT 2006 - fail-safe test.pl files -- can't determine success for "make test" when teed and can't parse for Test::Harness output - fail-safe output parsing -- if the expected failure string from Test::Harness is not found, report "unknown" instead of fail - added compatibility for CPAN.pm "reload cpan" command (Andreas Konig) - added options "debug" and "editor" (Andreas Konig) - bumped Tee version requirement 0.10 Tue Aug 8 23:56:07 EDT 2006 - first public release -- support not yet available in CPAN.pm main branch # vim: ts=2 sts=2 sw=2 et tw=75 : LICENSE100644000765000024 2633514423611161 14467 0ustar00garustaff000000000000CPAN-Reporter-1.2019This software is Copyright (c) 2023 by David Golden. This is free software, licensed under: The Apache License, Version 2.0, January 2004 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2023 David Golden Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. dist.ini100644000765000024 62714423611161 15062 0ustar00garustaff000000000000CPAN-Reporter-1.2019name = CPAN-Reporter author = David Golden license = Apache_2_0 copyright_holder = David Golden copyright_year = 2023 [@DAGOLDEN] :version = 0.072 stopwords = cpanreporter stopwords = exe stopwords = metabase stopwords = na stopwords = skipfile [Prereqs] perl = 5.006 [RemovePrereqs] remove = FuddleDuddleCantFindMe remove = Bogus::NormalVersion META.yml100644000765000024 536214423611161 14710 0ustar00garustaff000000000000CPAN-Reporter-1.2019--- abstract: 'Adds CPAN Testers reporting to CPAN.pm' author: - 'David Golden ' build_requires: Archive::Tar: '1.54' ExtUtils::MakeMaker: '6.36' File::Copy: '0' File::Spec: '3.19' File::Spec::Functions: '0' File::pushd: '0.32' FindBin: '0' IO::Handle: '0' Test::Harness: '0' Test::More: '0.62' lib: '0' perl: '5.008' warnings: '0' configure_requires: ExtUtils::MakeMaker: '6.17' perl: '5.006' dynamic_config: 0 generated_by: 'Dist::Zilla version 6.030, CPAN::Meta::Converter version 2.150010' license: apache meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: CPAN-Reporter no_index: directory: - corpus - examples - t - xt package: - DB provides: CPAN::Reporter: file: lib/CPAN/Reporter.pm version: '1.2019' CPAN::Reporter::API: file: lib/CPAN/Reporter/API.pm version: '1.2019' CPAN::Reporter::Config: file: lib/CPAN/Reporter/Config.pm version: '1.2019' CPAN::Reporter::FAQ: file: lib/CPAN/Reporter/FAQ.pm version: '1.2019' CPAN::Reporter::History: file: lib/CPAN/Reporter/History.pm version: '1.2019' CPAN::Reporter::PrereqCheck: file: lib/CPAN/Reporter/PrereqCheck.pm version: '1.2019' requires: CPAN: '1.94' CPAN::Version: '0' Capture::Tiny: '0' Carp: '0' Config::Tiny: '2.08' Data::Dumper: '0' Devel::Autoflush: '0.04' Exporter: '0' ExtUtils::MakeMaker: '6.36' Fcntl: '0' File::Basename: '0' File::Find: '0' File::Glob: '0' File::HomeDir: '0.58' File::Path: '0' File::Spec: '3.19' File::Temp: '0.16' IO::File: '0' IPC::Cmd: '0.76' Parse::CPAN::Meta: '0' Probe::Perl: '0' Test::Reporter: '1.54' constant: '0' perl: '5.008' strict: '0' vars: '0' resources: bugtracker: https://github.com/cpan-testers/CPAN-Reporter/issues homepage: https://github.com/cpan-testers/CPAN-Reporter repository: https://github.com/cpan-testers/CPAN-Reporter.git version: '1.2019' x_authority: cpan:DAGOLDEN x_contributors: - 'Alexandr Ciornii ' - 'Breno G. de Oliveira ' - 'Christian Walde ' - 'David Cantrell ' - 'Ed J ' - 'Graham Knop ' - 'James E Keenan ' - 'J. Maslak ' - 'José Joaquín Atria ' - 'Kent Fredric ' - 'Matthew Musgrove ' - 'Patrice Clement ' - 'Reini Urban ' - 'Scott Wiersdorf ' - 'Slaven Rezic ' x_generated_by_perl: v5.36.0 x_serialization_backend: 'YAML::Tiny version 1.74' x_spdx_expression: Apache-2.0 cpanfile100644000765000024 476614423611161 15152 0ustar00garustaff000000000000CPAN-Reporter-1.2019# This file is generated by Dist::Zilla::Plugin::CPANFile v6.030 # Do not edit this file directly. To change prereqs, edit the `dist.ini` file. requires "CPAN" => "1.94"; requires "CPAN::Version" => "0"; requires "Capture::Tiny" => "0"; requires "Carp" => "0"; requires "Config::Tiny" => "2.08"; requires "Data::Dumper" => "0"; requires "Devel::Autoflush" => "0.04"; requires "Exporter" => "0"; requires "ExtUtils::MakeMaker" => "6.36"; requires "Fcntl" => "0"; requires "File::Basename" => "0"; requires "File::Find" => "0"; requires "File::Glob" => "0"; requires "File::HomeDir" => "0.58"; requires "File::Path" => "0"; requires "File::Spec" => "3.19"; requires "File::Temp" => "0.16"; requires "IO::File" => "0"; requires "IPC::Cmd" => "0.76"; requires "Parse::CPAN::Meta" => "0"; requires "Probe::Perl" => "0"; requires "Test::Reporter" => "1.54"; requires "constant" => "0"; requires "perl" => "5.008"; requires "strict" => "0"; requires "vars" => "0"; on 'test' => sub { requires "Archive::Tar" => "1.54"; requires "ExtUtils::MakeMaker" => "6.36"; requires "File::Copy" => "0"; requires "File::Spec" => "3.19"; requires "File::Spec::Functions" => "0"; requires "File::pushd" => "0.32"; requires "FindBin" => "0"; requires "IO::Handle" => "0"; requires "Test::Harness" => "0"; requires "Test::More" => "0.62"; requires "lib" => "0"; requires "perl" => "5.008"; requires "warnings" => "0"; }; on 'test' => sub { recommends "CPAN::Meta" => "2.120900"; }; on 'configure' => sub { requires "ExtUtils::MakeMaker" => "6.17"; requires "perl" => "5.006"; }; on 'configure' => sub { suggests "JSON::PP" => "2.27300"; }; on 'develop' => sub { requires "Dist::Zilla" => "5"; requires "Dist::Zilla::Plugin::Prereqs" => "0"; requires "Dist::Zilla::Plugin::RemovePrereqs" => "0"; requires "Dist::Zilla::PluginBundle::DAGOLDEN" => "0.072"; requires "File::Spec" => "0"; requires "File::Temp" => "0"; requires "IO::Handle" => "0"; requires "IPC::Open3" => "0"; requires "Pod::Coverage::TrustPod" => "0"; requires "Pod::Wordlist" => "0"; requires "Software::License::Apache_2_0" => "0"; requires "Test::CPAN::Meta" => "0"; requires "Test::MinimumVersion" => "0"; requires "Test::More" => "0"; requires "Test::Perl::Critic" => "0"; requires "Test::Pod" => "1.41"; requires "Test::Pod::Coverage" => "1.08"; requires "Test::Portability::Files" => "0"; requires "Test::Spelling" => "0.12"; requires "Test::Version" => "1"; requires "perl" => "5.006"; requires "warnings" => "0"; }; MANIFEST100644000765000024 2711414423611161 14607 0ustar00garustaff000000000000CPAN-Reporter-1.2019# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.030. CONTRIBUTING.mkdn Changes LICENSE MANIFEST META.json META.yml Makefile.PL README Todo corpus/NoTestDir/Build.PL corpus/NoTestDir/Makefile.PL corpus/NoTestDir/lib/Bogus/Module.pm corpus/NoTestFiles/Build.PL corpus/NoTestFiles/Makefile.PL corpus/NoTestFiles/lib/Bogus/Module.pm corpus/NoTestFiles/t/README corpus/NoTestTarget/Build.PL corpus/NoTestTarget/Makefile.PL corpus/NoTestTarget/lib/Bogus/Module.pm corpus/PL-ConfigRequires/Build.PL corpus/PL-ConfigRequires/MANIFEST corpus/PL-ConfigRequires/MANIFEST.SKIP corpus/PL-ConfigRequires/META.yml corpus/PL-ConfigRequires/Makefile.PL corpus/PL-ConfigRequires/lib/Bogus/Module.pm corpus/PL-ConfigRequires/t/01_Bogus.t corpus/PL-ConfigRequiresError/Build.PL corpus/PL-ConfigRequiresError/MANIFEST corpus/PL-ConfigRequiresError/MANIFEST.SKIP corpus/PL-ConfigRequiresError/META.yml corpus/PL-ConfigRequiresError/Makefile.PL corpus/PL-ConfigRequiresError/lib/Bogus/Module.pm corpus/PL-ConfigRequiresError/t/01_Bogus.t corpus/PL-Fail/Build.PL corpus/PL-Fail/Makefile.PL corpus/PL-Fail/lib/Bogus/Module.pm corpus/PL-Fail/t/01_Bogus.t corpus/PL-Hang/Build.PL corpus/PL-Hang/Makefile.PL corpus/PL-Hang/lib/Bogus/Module.pm corpus/PL-Hang/t/01_Bogus.t corpus/PL-MIRequirePerl/Build.PL corpus/PL-MIRequirePerl/Makefile.PL corpus/PL-MIRequirePerl/lib/Bogus/Module.pm corpus/PL-MIRequirePerl/t/01_Bogus.t corpus/PL-NoMakefileOrBuild/Build.PL corpus/PL-NoMakefileOrBuild/Makefile.PL corpus/PL-NoMakefileOrBuild/lib/Bogus/Module.pm corpus/PL-NoMakefileOrBuild/t/01_Bogus.t corpus/PL-NoSupport/Build.PL corpus/PL-NoSupport/Makefile.PL corpus/PL-NoSupport/lib/Bogus/Module.pm corpus/PL-NoSupport/t/01_Bogus.t corpus/PL-OSUnsupported/Build.PL corpus/PL-OSUnsupported/Makefile.PL corpus/PL-OSUnsupported/lib/Bogus/Module.pm corpus/PL-OSUnsupported/t/01_Bogus.t corpus/PL-PrereqFail/Build.PL corpus/PL-PrereqFail/Makefile.PL corpus/PL-PrereqFail/lib/Bogus/Module.pm corpus/PL-PrereqFail/t/01_Bogus.t corpus/PL-PrereqMiss/Build.PL corpus/PL-PrereqMiss/Makefile.PL corpus/PL-PrereqMiss/lib/Bogus/Module.pm corpus/PL-PrereqMiss/t/01_Bogus.t corpus/PL-PrereqMissOK/Build.PL corpus/PL-PrereqMissOK/Makefile.PL corpus/PL-PrereqMissOK/lib/Bogus/Module.pm corpus/PL-PrereqMissOK/t/01_Bogus.t corpus/PL-RequirePerl/Build.PL corpus/PL-RequirePerl/Makefile.PL corpus/PL-RequirePerl/lib/Bogus/Module.pm corpus/PL-RequirePerl/t/01_Bogus.t corpus/PL-warn-OSUnsupported/Build.PL corpus/PL-warn-OSUnsupported/Makefile.PL corpus/PL-warn-OSUnsupported/lib/Bogus/Module.pm corpus/PL-warn-OSUnsupported/t/01_Bogus.t corpus/custom-NoOutput-NOK/Build.PL corpus/custom-NoOutput-NOK/Makefile.PL corpus/custom-NoOutput-NOK/lib/Bogus/Module.pm corpus/custom-NoOutput-NOK/test/Tester.pl corpus/custom-NoOutput-OK/Build.PL corpus/custom-NoOutput-OK/Makefile.PL corpus/custom-NoOutput-OK/lib/Bogus/Module.pm corpus/custom-NoOutput-OK/test/Tester.pl corpus/make-Fail/Build.PL corpus/make-Fail/Die.PL corpus/make-Fail/Makefile.PL corpus/make-Fail/lib/Bogus/Module.pm corpus/make-Fail/t/01_Bogus.t corpus/make-PrereqFail/Build.PL corpus/make-PrereqFail/Die.PL corpus/make-PrereqFail/Makefile.PL corpus/make-PrereqFail/lib/Bogus/Module.pm corpus/make-PrereqFail/t/01_Bogus.t corpus/make-PrereqMiss/Build.PL corpus/make-PrereqMiss/Die.PL corpus/make-PrereqMiss/Makefile.PL corpus/make-PrereqMiss/lib/Bogus/Module.pm corpus/make-PrereqMiss/t/01_Bogus.t corpus/make-RequirePerl/Build.PL corpus/make-RequirePerl/Die.PL corpus/make-RequirePerl/Makefile.PL corpus/make-RequirePerl/lib/Bogus/Module.pm corpus/make-RequirePerl/t/01_Bogus.t corpus/t-BailOut/Build.PL corpus/t-BailOut/Makefile.PL corpus/t-BailOut/lib/Bogus/Module.pm corpus/t-BailOut/t/01_Bogus.t corpus/t-Fail-LongOutput/Build.PL corpus/t-Fail-LongOutput/Makefile.PL corpus/t-Fail-LongOutput/lib/Bogus/Module.pm corpus/t-Fail-LongOutput/t/01_Bogus.t corpus/t-Fail/Build.PL corpus/t-Fail/Makefile.PL corpus/t-Fail/lib/Bogus/Module.pm corpus/t-Fail/t/01_Bogus.t corpus/t-Hang/Build.PL corpus/t-Hang/Makefile.PL corpus/t-Hang/lib/Bogus/Module.pm corpus/t-Hang/t/01_Bogus.t corpus/t-Harness-Fail/Build.PL corpus/t-Harness-Fail/Makefile.PL corpus/t-Harness-Fail/lib/Bogus/Module.pm corpus/t-Harness-Fail/t/01_Bogus.t corpus/t-MultipleMatch/Build.PL corpus/t-MultipleMatch/Makefile.PL corpus/t-MultipleMatch/lib/Bogus/Module.pm corpus/t-MultipleMatch/report-pass corpus/t-MultipleMatch/t/01_Bogus.t corpus/t-NoOutput-die/Build.PL corpus/t-NoOutput-die/Makefile.PL corpus/t-NoOutput-die/lib/Bogus/Module.pm corpus/t-NoOutput-die/t/01_Bogus.t corpus/t-NoOutput/Build.PL corpus/t-NoOutput/Makefile.PL corpus/t-NoOutput/lib/Bogus/Module.pm corpus/t-NoOutput/t/01_Bogus.t corpus/t-NoSupport/Build.PL corpus/t-NoSupport/Makefile.PL corpus/t-NoSupport/lib/Bogus/Module.pm corpus/t-NoSupport/t/01_Bogus.t corpus/t-NoTestsButPrereqMiss/Build.PL corpus/t-NoTestsButPrereqMiss/Makefile.PL corpus/t-NoTestsButPrereqMiss/lib/Bogus/Module.pm corpus/t-OSUnsupported/Build.PL corpus/t-OSUnsupported/Makefile.PL corpus/t-OSUnsupported/lib/Bogus/Module.pm corpus/t-OSUnsupported/t/01_Bogus.t corpus/t-Pass/Build.PL corpus/t-Pass/Makefile.PL corpus/t-Pass/lib/Bogus/Module.pm corpus/t-Pass/t/01_Bogus.t corpus/t-PrereqFail/Build.PL corpus/t-PrereqFail/Makefile.PL corpus/t-PrereqFail/lib/Bogus/Module.pm corpus/t-PrereqFail/t/01_Bogus.t corpus/t-PrereqMiss/Build.PL corpus/t-PrereqMiss/Makefile.PL corpus/t-PrereqMiss/lib/Bogus/Module.pm corpus/t-PrereqMiss/t/01_Bogus.t corpus/t-PrereqPerl-NOK-our/Build.PL corpus/t-PrereqPerl-NOK-our/Makefile.PL corpus/t-PrereqPerl-NOK-our/lib/Bogus/Module.pm corpus/t-PrereqPerl-NOK-our/t/01_Bogus.t corpus/t-PrereqPerl-NOK/Build.PL corpus/t-PrereqPerl-NOK/Makefile.PL corpus/t-PrereqPerl-NOK/lib/Bogus/Module.pm corpus/t-PrereqPerl-NOK/t/01_Bogus.t corpus/t-PrereqPerl-OK/Build.PL corpus/t-PrereqPerl-OK/Makefile.PL corpus/t-PrereqPerl-OK/lib/Bogus/Module.pm corpus/t-PrereqPerl-OK/t/01_Bogus.t corpus/t-Recurse-Fail-t/Build.PL corpus/t-Recurse-Fail-t/Makefile.PL corpus/t-Recurse-Fail-t/lib/Bogus/Module.pm corpus/t-Recurse-Fail-t/t-Fail/Build.PL corpus/t-Recurse-Fail-t/t-Fail/Makefile.PL corpus/t-Recurse-Fail-t/t-Fail/lib/Bogus/Module.pm corpus/t-Recurse-Fail-t/t-Fail/t/01_Bogus.t corpus/t-Recurse-Fail-t/test.pl-Pass/Build.PL corpus/t-Recurse-Fail-t/test.pl-Pass/Makefile.PL corpus/t-Recurse-Fail-t/test.pl-Pass/lib/Bogus/Module.pm corpus/t-Recurse-Fail-t/test.pl-Pass/test.pl corpus/t-Recurse-Fail-test.pl/Build.PL corpus/t-Recurse-Fail-test.pl/Makefile.PL corpus/t-Recurse-Fail-test.pl/lib/Bogus/Module.pm corpus/t-Recurse-Fail-test.pl/t-Pass/Build.PL corpus/t-Recurse-Fail-test.pl/t-Pass/Makefile.PL corpus/t-Recurse-Fail-test.pl/t-Pass/lib/Bogus/Module.pm corpus/t-Recurse-Fail-test.pl/t-Pass/t/01_Bogus.t corpus/t-Recurse-Fail-test.pl/test.pl-Fail/Build.PL corpus/t-Recurse-Fail-test.pl/test.pl-Fail/Makefile.PL corpus/t-Recurse-Fail-test.pl/test.pl-Fail/lib/Bogus/Module.pm corpus/t-Recurse-Fail-test.pl/test.pl-Fail/test.pl corpus/t-Recurse-Pass/Build.PL corpus/t-Recurse-Pass/Makefile.PL corpus/t-Recurse-Pass/lib/Bogus/Module.pm corpus/t-Recurse-Pass/t-Pass/Build.PL corpus/t-Recurse-Pass/t-Pass/Makefile.PL corpus/t-Recurse-Pass/t-Pass/lib/Bogus/Module.pm corpus/t-Recurse-Pass/t-Pass/t/01_Bogus.t corpus/t-Recurse-Pass/t/01_Bogus.t corpus/t-Recurse-Pass/test.pl-Pass/Build.PL corpus/t-Recurse-Pass/test.pl-Pass/Makefile.PL corpus/t-Recurse-Pass/test.pl-Pass/lib/Bogus/Module.pm corpus/t-Recurse-Pass/test.pl-Pass/test.pl corpus/t-RequirePerl/Build.PL corpus/t-RequirePerl/Makefile.PL corpus/t-RequirePerl/lib/Bogus/Module.pm corpus/t-RequirePerl/t/01_Bogus.t corpus/t-test.pl-Fail-Pass/Build.PL corpus/t-test.pl-Fail-Pass/Makefile.PL corpus/t-test.pl-Fail-Pass/lib/Bogus/Module.pm corpus/t-test.pl-Fail-Pass/t/01_Bogus.t corpus/t-test.pl-Fail-Pass/test.pl corpus/t-test.pl-Pass-NoOutput-NOK/Build.PL corpus/t-test.pl-Pass-NoOutput-NOK/Makefile.PL corpus/t-test.pl-Pass-NoOutput-NOK/lib/Bogus/Module.pm corpus/t-test.pl-Pass-NoOutput-NOK/t/01_Bogus.t corpus/t-test.pl-Pass-NoOutput-NOK/test.pl corpus/t-test.pl-Pass-NoOutput-OK/Build.PL corpus/t-test.pl-Pass-NoOutput-OK/Makefile.PL corpus/t-test.pl-Pass-NoOutput-OK/lib/Bogus/Module.pm corpus/t-test.pl-Pass-NoOutput-OK/t/01_Bogus.t corpus/t-test.pl-Pass-NoOutput-OK/test.pl corpus/t-test.pl-Pass-Pass/Build.PL corpus/t-test.pl-Pass-Pass/Makefile.PL corpus/t-test.pl-Pass-Pass/lib/Bogus/Module.pm corpus/t-test.pl-Pass-Pass/t/01_Bogus.t corpus/t-test.pl-Pass-Pass/test.pl corpus/test.pl-Fail/Build.PL corpus/test.pl-Fail/Makefile.PL corpus/test.pl-Fail/lib/Bogus/Module.pm corpus/test.pl-Fail/test.pl corpus/test.pl-NoOutput-NOK/Build.PL corpus/test.pl-NoOutput-NOK/Makefile.PL corpus/test.pl-NoOutput-NOK/lib/Bogus/Module.pm corpus/test.pl-NoOutput-NOK/test.pl corpus/test.pl-NoOutput-OK/Build.PL corpus/test.pl-NoOutput-OK/Makefile.PL corpus/test.pl-NoOutput-OK/lib/Bogus/Module.pm corpus/test.pl-NoOutput-OK/test.pl corpus/test.pl-OSUnsupported/Build.PL corpus/test.pl-OSUnsupported/Makefile.PL corpus/test.pl-OSUnsupported/lib/Bogus/Module.pm corpus/test.pl-OSUnsupported/test.pl corpus/test.pl-Pass/Build.PL corpus/test.pl-Pass/Makefile.PL corpus/test.pl-Pass/lib/Bogus/Module.pm corpus/test.pl-Pass/test.pl corpus/test.pl-PrereqFail/Build.PL corpus/test.pl-PrereqFail/Makefile.PL corpus/test.pl-PrereqFail/lib/Bogus/Module.pm corpus/test.pl-PrereqFail/test.pl corpus/test.pl-PrereqMiss/Build.PL corpus/test.pl-PrereqMiss/Makefile.PL corpus/test.pl-PrereqMiss/lib/Bogus/Module.pm corpus/test.pl-PrereqMiss/test.pl corpus/test.pl-PrereqPerl-NOK/Build.PL corpus/test.pl-PrereqPerl-NOK/Makefile.PL corpus/test.pl-PrereqPerl-NOK/lib/Bogus/Module.pm corpus/test.pl-PrereqPerl-NOK/test.pl corpus/test.pl-PrereqPerl-OK/Build.PL corpus/test.pl-PrereqPerl-OK/Makefile.PL corpus/test.pl-PrereqPerl-OK/lib/Bogus/Module.pm corpus/test.pl-PrereqPerl-OK/test.pl cpanfile dist.ini examples/config.ini lib/CPAN/Reporter.pm lib/CPAN/Reporter/API.pm lib/CPAN/Reporter/Config.pm lib/CPAN/Reporter/FAQ.pm lib/CPAN/Reporter/History.pm lib/CPAN/Reporter/PrereqCheck.pm perlcritic.rc t/00-report-prereqs.dd t/00-report-prereqs.t t/01_CPAN_Reporter.t t/02_config_env_vars.t t/03_config_file.t t/04_option_parsing.t t/05_prompting.t t/06_prompt_text.t t/10_prereq_check.t t/10_prereq_computed.t t/10_prereq_pm.t t/11_env_config.t t/12_toolchain_versions.t t/13_record_command.t t/14_command_timeout.t t/15_option_validation.t t/20_report_output.t t/30_PL_report.t t/31_PL_report_discard.t t/40_make_report.t t/41_make_report_discard.t t/50_test_report_pass.t t/51_test_report_fail.t t/52_test_report_unknown.t t/53_test_report_na.t t/54_test_report_split.t t/55_test_report_discard.t t/56_test_report_by_harness.t t/57_hang_interrupt.t t/60_discard_triggers.t t/61_bad_dist_names.t t/62_duplicate_reports.t t/63_config_send_report.t t/64_transport.t t/65_skipfile.t t/66_have_tested.t t/67_distfile.t t/68_is_make.t t/70_darwin_move_config.t t/71_missing_config.t t/72_rename_history.t t/73_autoflush.t t/bin/Build.PL t/bin/Makefile.PL t/bin/NotBuild.PL t/bin/NotMakefile.PL t/history/history.db t/history/reports-sent-longer.db t/history/reports-sent.db t/lib/Frontend.pm t/lib/Helper.pm t/lib/MockCPANDist.pm t/lib/MockHomeDir.pm t/lib/MockPatchlevel.pm t/perl5lib-shadow/Bogus/Shadow.pm t/perl5lib/Bogus/Broken.pm t/perl5lib/Bogus/Complex.pm t/perl5lib/Bogus/ComputedVersion.pm t/perl5lib/Bogus/Conflict.pm t/perl5lib/Bogus/Found.pm t/perl5lib/Bogus/GT.pm t/perl5lib/Bogus/GTE.pm t/perl5lib/Bogus/LT.pm t/perl5lib/Bogus/LTE.pm t/perl5lib/Bogus/NoVersion.pm t/perl5lib/Bogus/NormalVersion.pm t/perl5lib/Bogus/Shadow.pm t/perl5lib/Bogus/TooOld.pm xt/author/00-compile.t xt/author/critic.t xt/author/distmeta.t xt/author/minimum-version.t xt/author/pod-coverage.t xt/author/pod-spell.t xt/author/pod-syntax.t xt/author/portability.t xt/author/test-version.t META.json100644000765000024 1235314423611161 15076 0ustar00garustaff000000000000CPAN-Reporter-1.2019{ "abstract" : "Adds CPAN Testers reporting to CPAN.pm", "author" : [ "David Golden " ], "dynamic_config" : 0, "generated_by" : "Dist::Zilla version 6.030, CPAN::Meta::Converter version 2.150010", "license" : [ "apache_2_0" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "CPAN-Reporter", "no_index" : { "directory" : [ "corpus", "examples", "t", "xt" ], "package" : [ "DB" ] }, "prereqs" : { "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.17", "perl" : "5.006" }, "suggests" : { "JSON::PP" : "2.27300" } }, "develop" : { "requires" : { "Dist::Zilla" : "5", "Dist::Zilla::Plugin::Prereqs" : "0", "Dist::Zilla::Plugin::RemovePrereqs" : "0", "Dist::Zilla::PluginBundle::DAGOLDEN" : "0.072", "File::Spec" : "0", "File::Temp" : "0", "IO::Handle" : "0", "IPC::Open3" : "0", "Pod::Coverage::TrustPod" : "0", "Pod::Wordlist" : "0", "Software::License::Apache_2_0" : "0", "Test::CPAN::Meta" : "0", "Test::MinimumVersion" : "0", "Test::More" : "0", "Test::Perl::Critic" : "0", "Test::Pod" : "1.41", "Test::Pod::Coverage" : "1.08", "Test::Portability::Files" : "0", "Test::Spelling" : "0.12", "Test::Version" : "1", "perl" : "5.006", "warnings" : "0" } }, "runtime" : { "requires" : { "CPAN" : "1.94", "CPAN::Version" : "0", "Capture::Tiny" : "0", "Carp" : "0", "Config::Tiny" : "2.08", "Data::Dumper" : "0", "Devel::Autoflush" : "0.04", "Exporter" : "0", "ExtUtils::MakeMaker" : "6.36", "Fcntl" : "0", "File::Basename" : "0", "File::Find" : "0", "File::Glob" : "0", "File::HomeDir" : "0.58", "File::Path" : "0", "File::Spec" : "3.19", "File::Temp" : "0.16", "IO::File" : "0", "IPC::Cmd" : "0.76", "Parse::CPAN::Meta" : "0", "Probe::Perl" : "0", "Test::Reporter" : "1.54", "constant" : "0", "perl" : "5.008", "strict" : "0", "vars" : "0" } }, "test" : { "recommends" : { "CPAN::Meta" : "2.120900" }, "requires" : { "Archive::Tar" : "1.54", "ExtUtils::MakeMaker" : "6.36", "File::Copy" : "0", "File::Spec" : "3.19", "File::Spec::Functions" : "0", "File::pushd" : "0.32", "FindBin" : "0", "IO::Handle" : "0", "Test::Harness" : "0", "Test::More" : "0.62", "lib" : "0", "perl" : "5.008", "warnings" : "0" } } }, "provides" : { "CPAN::Reporter" : { "file" : "lib/CPAN/Reporter.pm", "version" : "1.2019" }, "CPAN::Reporter::API" : { "file" : "lib/CPAN/Reporter/API.pm", "version" : "1.2019" }, "CPAN::Reporter::Config" : { "file" : "lib/CPAN/Reporter/Config.pm", "version" : "1.2019" }, "CPAN::Reporter::FAQ" : { "file" : "lib/CPAN/Reporter/FAQ.pm", "version" : "1.2019" }, "CPAN::Reporter::History" : { "file" : "lib/CPAN/Reporter/History.pm", "version" : "1.2019" }, "CPAN::Reporter::PrereqCheck" : { "file" : "lib/CPAN/Reporter/PrereqCheck.pm", "version" : "1.2019" } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/cpan-testers/CPAN-Reporter/issues" }, "homepage" : "https://github.com/cpan-testers/CPAN-Reporter", "repository" : { "type" : "git", "url" : "https://github.com/cpan-testers/CPAN-Reporter.git", "web" : "https://github.com/cpan-testers/CPAN-Reporter" } }, "version" : "1.2019", "x_authority" : "cpan:DAGOLDEN", "x_contributors" : [ "Alexandr Ciornii ", "Breno G. de Oliveira ", "Christian Walde ", "David Cantrell ", "Ed J ", "Graham Knop ", "James E Keenan ", "J. Maslak ", "Jos\u00e9 Joaqu\u00edn Atria ", "Kent Fredric ", "Matthew Musgrove ", "Patrice Clement ", "Reini Urban ", "Scott Wiersdorf ", "Slaven Rezic " ], "x_generated_by_perl" : "v5.36.0", "x_serialization_backend" : "Cpanel::JSON::XS version 4.30", "x_spdx_expression" : "Apache-2.0" } Makefile.PL100644000765000024 524014423611161 15404 0ustar00garustaff000000000000CPAN-Reporter-1.2019# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.030. use strict; use warnings; use 5.008; use ExtUtils::MakeMaker 6.17; my %WriteMakefileArgs = ( "ABSTRACT" => "Adds CPAN Testers reporting to CPAN.pm", "AUTHOR" => "David Golden ", "CONFIGURE_REQUIRES" => { "ExtUtils::MakeMaker" => "6.17" }, "DISTNAME" => "CPAN-Reporter", "LICENSE" => "apache", "MIN_PERL_VERSION" => "5.008", "NAME" => "CPAN::Reporter", "PREREQ_PM" => { "CPAN" => "1.94", "CPAN::Version" => 0, "Capture::Tiny" => 0, "Carp" => 0, "Config::Tiny" => "2.08", "Data::Dumper" => 0, "Devel::Autoflush" => "0.04", "Exporter" => 0, "ExtUtils::MakeMaker" => "6.36", "Fcntl" => 0, "File::Basename" => 0, "File::Find" => 0, "File::Glob" => 0, "File::HomeDir" => "0.58", "File::Path" => 0, "File::Spec" => "3.19", "File::Temp" => "0.16", "IO::File" => 0, "IPC::Cmd" => "0.76", "Parse::CPAN::Meta" => 0, "Probe::Perl" => 0, "Test::Reporter" => "1.54", "constant" => 0, "strict" => 0, "vars" => 0 }, "TEST_REQUIRES" => { "Archive::Tar" => "1.54", "ExtUtils::MakeMaker" => "6.36", "File::Copy" => 0, "File::Spec" => "3.19", "File::Spec::Functions" => 0, "File::pushd" => "0.32", "FindBin" => 0, "IO::Handle" => 0, "Test::Harness" => 0, "Test::More" => "0.62", "lib" => 0, "warnings" => 0 }, "VERSION" => "1.2019", "test" => { "TESTS" => "t/*.t" } ); my %FallbackPrereqs = ( "Archive::Tar" => "1.54", "CPAN" => "1.94", "CPAN::Version" => 0, "Capture::Tiny" => 0, "Carp" => 0, "Config::Tiny" => "2.08", "Data::Dumper" => 0, "Devel::Autoflush" => "0.04", "Exporter" => 0, "ExtUtils::MakeMaker" => "6.36", "Fcntl" => 0, "File::Basename" => 0, "File::Copy" => 0, "File::Find" => 0, "File::Glob" => 0, "File::HomeDir" => "0.58", "File::Path" => 0, "File::Spec" => "3.19", "File::Spec::Functions" => 0, "File::Temp" => "0.16", "File::pushd" => "0.32", "FindBin" => 0, "IO::File" => 0, "IO::Handle" => 0, "IPC::Cmd" => "0.76", "Parse::CPAN::Meta" => 0, "Probe::Perl" => 0, "Test::Harness" => 0, "Test::More" => "0.62", "Test::Reporter" => "1.54", "constant" => 0, "lib" => 0, "strict" => 0, "vars" => 0, "warnings" => 0 ); unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) { delete $WriteMakefileArgs{TEST_REQUIRES}; delete $WriteMakefileArgs{BUILD_REQUIRES}; $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs; } delete $WriteMakefileArgs{CONFIGURE_REQUIRES} unless eval { ExtUtils::MakeMaker->VERSION(6.52) }; WriteMakefile(%WriteMakefileArgs); perlcritic.rc100644000765000024 116614423611161 16123 0ustar00garustaff000000000000CPAN-Reporter-1.2019severity = 5 verbose = 8 [Variables::ProhibitPunctuationVars] allow = $@ $! [TestingAndDebugging::ProhibitNoStrict] allow = refs [Variables::ProhibitEvilVariables] variables = $DB::single # Turn these off [-BuiltinFunctions::ProhibitStringyEval] [-ControlStructures::ProhibitPostfixControls] [-ControlStructures::ProhibitUnlessBlocks] [-Documentation::RequirePodSections] [-InputOutput::ProhibitInteractiveTest] [-References::ProhibitDoubleSigils] [-RegularExpressions::RequireExtendedFormatting] [-InputOutput::ProhibitTwoArgOpen] [-Modules::ProhibitEvilModules] # Turn this on [Lax::ProhibitStringyEval::ExceptForRequire] t000755000765000024 014423611161 13534 5ustar00garustaff000000000000CPAN-Reporter-1.201968_is_make.t100644000765000024 206414423611161 16010 0ustar00garustaff000000000000CPAN-Reporter-1.2019/tuse strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } use Test::More; use lib 't/lib'; use Helper; use Frontend; my @cases = ( # Makefile.PL based stuff should be true ['perl Makefile.PL' => 1], ['perl Makefile.PL LIBS=/foo' => 1], ['make' => 1], ['make LIBS=/foo' => 1], ['make test' => 1], ['make test TEST_VERBOSE=1' => 1], # make variants ['dmake' => 1], ['dmake LIBS=/foo' => 1], ['dmake test' => 1], ['dmake test TEST_VERBOSE=1' => 1], ['nmake' => 1], ['nmake LIBS=/foo' => 1], ['nmake test' => 1], ['nmake test TEST_VERBOSE=1' => 1], # Build.PL based stuff should be false ['perl Build.PL' => 0], ['perl Build.PL LIBS=/foo' => 0], ['Build' => 0], ['Build LIBS=/foo' => 0], ['Build test' => 0], ['Build test TEST_VERBOSE=1' => 0], ); plan tests => 2 + @cases; require_ok( 'CPAN::Reporter' ); can_ok( 'CPAN::Reporter', '_is_make' ); for my $c (@cases) { my ($cmd, $expected) = @$c; is( CPAN::Reporter::_is_make($cmd), $expected, $cmd ); } bin000755000765000024 014423611161 14304 5ustar00garustaff000000000000CPAN-Reporter-1.2019/tBuild.PL100644000765000024 6514423611161 15701 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/binuse strict; print( ($| ? "1" : "0"), "\n" ); exit; 65_skipfile.t100644000765000024 503714423611161 16206 0ustar00garustaff000000000000CPAN-Reporter-1.2019/tuse strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use MockCPANDist; use Helper; use Frontend; use Config; use Probe::Perl; use File::Temp; # Need to have bleadperls pretend to be normal for these tests use MockPatchlevel; my $make = $Config{make}; my $perl = Probe::Perl->find_perl_interpreter(); $perl = qq{"$perl"}; my $skipfile = File::Temp->new(); print {$skipfile} << 'SKIPFILE'; # comments should be ok ^JOHNDOE Bogus-SkipModule SKIPFILE $skipfile->close; my %mock_dist_options = ( prereq_pm => { requires => { 'File::Spec' => 0 }, }, author_id => "JOHNQP", author_fullname => "John Q. Public", ); my @cases = ( { label => "dist *not* in", pretty_id => "JOHNQP/Bogus-Module-1.23.tar.gz", name => "t-Fail", version => 1.23, grade => "fail", phase => "test", command => "$perl Makefile.PL", will_send => 1, }, { label => "dist author in", pretty_id => "JOHNDOE/Bogus-Module-1.23.tar.gz", name => "t-Fail", version => 1.23, grade => "fail", phase => "test", command => "$perl Makefile.PL", will_send => 0, }, { label => "dist name in", pretty_id => "JOHNQP/Bogus-SkipModule-1.23.tar.gz", name => "t-Fail", version => 1.23, grade => "fail", phase => "test", command => "$perl Makefile.PL", will_send => 0, }, { label => "dist name in - case insensitive", pretty_id => "johnqp/bogus-skipmodule-1.23.tar.gz", name => "t-Fail", version => 1.23, grade => "fail", phase => "test", command => "$perl Makefile.PL", will_send => 0, }, ); plan tests => 1 + @cases * (test_fake_config_plan() + test_dispatch_plan()); #--------------------------------------------------------------------------# # tests #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); # test send_skipfile for my $case ( @cases ) { local $case->{label} = $case->{label} . " send_skipfile"; $case->{dist} = MockCPANDist->new( pretty_id => $case->{pretty_id}, %mock_dist_options, ); test_fake_config( send_report => "yes", send_duplicates => "yes", send_skipfile => "$skipfile", ); test_dispatch( $case, will_send => $case->{will_send}, ); } 67_distfile.t100644000765000024 307214423611161 16202 0ustar00garustaff000000000000CPAN-Reporter-1.2019/tuse strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use MockCPANDist; use Helper; use Frontend; use Config; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my $make = $Config{make}; my $mock_dist = MockCPANDist->new( pretty_id => "JOHNQP/Bogus-Module-1.23.tar.gz", prereq_pm => { requires => { 'File::Spec' => 0 }, }, author_id => "JOHNQP", author_fullname => "John Q. Public", ); my $case = { label => "t-Pass", name => "t-Pass", dist => $mock_dist, version => 1.23, grade => "pass", phase => "test", command => "$make test", will_send => 1, options => { send_report => "yes", }, }; plan tests => 1 + 1 * (1 + test_fake_config_plan + test_dispatch_plan); #--------------------------------------------------------------------------# # tests #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); #--------------------------------------------------------------------------# # no transport advanced option set #--------------------------------------------------------------------------# test_fake_config( %{$case->{options}} ); test_dispatch( $case, will_send => $case->{will_send}, ); is( Test::Reporter::Mocked->distfile(), $mock_dist->{pretty_id}, "CPAN::Reporter sets Test::Reporter->distfile" ); lib000755000765000024 014423611161 14302 5ustar00garustaff000000000000CPAN-Reporter-1.2019/tHelper.pm100644000765000024 7226414423611161 16252 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/libpackage Helper; use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } use vars qw/@EXPORT/; @EXPORT = qw/ test_grade_make test_grade_make_plan test_grade_PL test_grade_PL_plan test_grade_test test_grade_test_plan test_fake_config test_fake_config_plan test_report test_report_plan test_dispatch test_dispatch_plan /; use Exporter (); our @ISA = 'Exporter'; use Config; use Archive::Tar 1.54 (); use File::Basename qw/basename/; use File::Copy; use File::Find; use File::Path qw/mkpath/; use File::pushd 0.32; use File::Spec 3.19 (); use File::Temp 0.16 qw/tempdir/; use Capture::Tiny qw/capture/; use Probe::Perl (); use Test::More 0.62; use MockHomeDir; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my $perl = Probe::Perl->find_perl_interpreter(); $perl = qq{"$perl"}; # protect from shell my $make = $Config{make}; my $temp_stdout = File::Temp->new() or die "Couldn't make temporary file:$!\nIs your temp drive full?"; my $corpus_dir = "./corpus"; my $home_dir = MockHomeDir::home_dir(); my $config_dir = File::Spec->catdir( $home_dir, ".cpanreporter" ); my $config_file = File::Spec->catfile( $config_dir, "config.ini" ); my $bogus_email_from = 'johndoe@example.com'; my $bogus_email_to = 'no_one@example.com'; my %tool_constants = ( 'eumm' => { module => 'ExtUtils::MakeMaker', have => eval "require ExtUtils::MakeMaker" || 0, PL => 'Makefile.PL', }, 'mb' => { module => 'Module::Build', have => eval "require Module::Build" || 0, PL => 'Build.PL' }, ); my $max_report_length = 1_000_000; # 1000K # used to capture from fixtures use vars qw/$sent_report @cc_list/; #--------------------------------------------------------------------------# # test config file prep #--------------------------------------------------------------------------# sub test_fake_config_plan() { 4 } sub test_fake_config { local $Test::Builder::Level = $Test::Builder::Level + 1; my %overrides = @_; is( File::HomeDir::my_documents(), MockHomeDir::home_dir(), "home directory mocked" ); mkpath $config_dir; ok( -d $config_dir, "config directory created" ); my $metabase_file = File::Spec->catfile( $config_dir, 'metabase_id.json' ); # 2-args open with bare descriptor to work in older perls open METABASE, ">$metabase_file"; close METABASE; ok -r $metabase_file, 'created mock metabase file for testing'; my $tiny = Config::Tiny->new(); $tiny->{_}{email_from} = $bogus_email_from; $tiny->{_}{email_to} = $bogus_email_to; # failsafe $tiny->{_}{send_report} = "yes"; $tiny->{_}{send_duplicates} = "yes"; # tests often repeat same stuff $tiny->{_}{transport} = "Metabase uri https://metabase.cpantesters.org/api/v1/ id_file metabase_id.json"; for my $key ( keys %overrides ) { $tiny->{_}{$key} = $overrides{$key}; } ok( $tiny->write( $config_file ), "created temp config file" ); } #--------------------------------------------------------------------------# # Test grade_PL #--------------------------------------------------------------------------# sub test_grade_PL_iter_plan() { 5 } sub test_grade_PL_plan() { test_grade_PL_iter_plan() * 2 } sub test_grade_PL { my ($case, $dist) = @_; local $Test::Builder::Level = $Test::Builder::Level + 1; local $ENV{PERL_MM_USE_DEFAULT} = 1; my $short_name = _short_name( $dist ); for my $tool ( qw/eumm mb/ ) { SKIP: { my ($have_tool,$tool_mod,$tool_PL) = @{$tool_constants{$tool}}{qw/have module PL/}; my $tool_label = $tool eq 'eumm' ? "Makefile.PL" : "Build.PL"; my $tool_cmd = "$perl $tool_label"; skip "$tool_mod not installed or working", test_grade_PL_iter_plan() if ! $have_tool; my $tempd = _ok_clone_dist_dir( $case->{name} ); local $dist->{build_dir} = "$tempd"; $Helper::sent_report = undef; $Helper::comments = undef; my ($stdout, $stderr, $build_rc, $test_build_rc, $output, $exit_value, $rc); eval { ($stdout, $stderr) = capture { ($output, $exit_value) = CPAN::Reporter::record_command($tool_cmd); $rc = CPAN::Reporter::grade_PL( $dist, $tool_cmd, $output, $exit_value ); }; }; if ( $@ ) { diag "DIED WITH:\n$@"; _diag_output( $stdout, $stderr ); skip "died grading PL", test_grade_PL_iter_plan() - 1; } my $is_rc_correct = $case->{"$tool\_success"} ? $rc : ! $rc; ok( $is_rc_correct, "$case->{name}: grade_PL() for $tool_PL returned " . $case->{"$tool\_success"} ); my $case_grade = $case->{"$tool\_grade"}; my $is_grade_correct; # Grade evaluation with special case if discarding my ($found_grade_result, $found_msg) = ( $stdout =~ /^CPAN::Reporter: ([^,]+), ([^\n]+)/ms ); if ( $case_grade eq 'discard' ) { is ($found_grade_result, "test results were not valid", "$case->{name}: '$tool_label' saw test results not valid message" ); like( $stdout, "/Test report will not be sent/", "$case->{name}: discard message correct" ) and $is_grade_correct++; ok( ! defined $Helper::sent_report, "$case->{name}: test results discarded" ); } else { my ($found_grade) = ( $found_grade_result =~ /$tool_label result is '([^']+)'/ ); is( $found_grade, $case_grade, "$case->{name}: '$tool_label' grade reported as '$case_grade'" ) or _diag_output( $stdout, $stderr ); my $ctr_regex = "/preparing a CPAN Testers report for \Q$short_name\E/"; if ( $case_grade eq 'pass' ) { unlike( $stdout, $ctr_regex , "$case->{name}: report notification correct" ) and $is_grade_correct++; ok( ! defined $Helper::sent_report, "$case->{name}: results not sent" ); } else { like( $stdout, $ctr_regex , "$case->{name}: report notification correct" ) and $is_grade_correct++; if ( -r $config_file ) { ok( defined $Helper::sent_report && length $Helper::sent_report, "$case->{name}: report was mock sent" ); } else { ok( ! defined $Helper::sent_report, "$case->{name}: results not sent" ); } } } _diag_output( $stdout, $stderr ) unless ( $is_rc_correct && $is_grade_correct ); } # SKIP } # for } #--------------------------------------------------------------------------# # Test grade_make #--------------------------------------------------------------------------# sub test_grade_make_iter_plan() { 6 } sub test_grade_make_plan() { test_grade_make_iter_plan() * 2 } sub test_grade_make { my ($case, $dist) = @_; local $Test::Builder::Level = $Test::Builder::Level + 1; local $ENV{PERL_MM_USE_DEFAULT} = 1; my $short_name = _short_name( $dist ); for my $tool ( qw/eumm mb/ ) { SKIP: { my ($have_tool,$tool_mod,$tool_PL) = @{$tool_constants{$tool}}{qw/have module PL/}; my $tool_cmd = $tool eq 'eumm' ? $Config{make} : "$perl Build"; my $tool_label = $tool eq 'eumm' ? $Config{make} : "Build"; skip "$tool_mod not installed or working", test_grade_make_iter_plan() if ! $have_tool; # Set up temporary directory for the case my $tempd = _ok_clone_dist_dir( $case->{name} ); $Helper::sent_report = undef; $Helper::comments = undef; my ($stdout, $stderr, $build_err, $test_build_rc, $output, $exit_value, $rc); ($stdout, $stderr) = capture { $build_err = system("$perl $tool_PL"); }; ok( ! $build_err, "$case->{name}: $tool_PL successful" ) or do { _diag_output( $stdout, $stderr ); skip "$tool_PL failed", test_grade_make_iter_plan() - 1; }; eval { ($stdout, $stderr) = capture { ($output, $exit_value) = CPAN::Reporter::record_command($tool_cmd); $rc = CPAN::Reporter::grade_make( $dist, $tool_cmd, $output, $exit_value ); }; }; if ( $@ ) { diag "DIED WITH:\n$@"; _diag_output( $stdout, $stderr ); skip "died grading make", test_grade_make_iter_plan() - 1; } my $is_rc_correct = $case->{"$tool\_success"} ? $rc : ! $rc; ok( $is_rc_correct, "$case->{name}: grade_make() for $tool_label returned " . $case->{"$tool\_success"} ); my $case_grade = $case->{"$tool\_grade"}; my $is_grade_correct; # Grade evaluation with special case if discarding my ($found_grade_result, $found_msg) = ( $stdout =~ /^CPAN::Reporter: ([^,]+), ([^\n]+)/ms ); if ( $case_grade eq 'discard' ) { is ($found_grade_result, "test results were not valid", "$case->{name}: '$tool_label' prerequisites not satisifed" ); like( $stdout, "/Test report will not be sent/", "$case->{name}: discard message correct" ) and $is_grade_correct++; ok( ! defined $Helper::sent_report, "$case->{name}: test results discarded" ); } else { my ($found_grade) = ( $found_grade_result =~ /\Q$tool_label\E result is '([^']+)'/ ); is( $found_grade, $case_grade, "$case->{name}: '$tool_label' grade reported as '$case_grade'" ) or _diag_output( $stdout, $stderr ); my $ctr_regex = "/preparing a CPAN Testers report for \Q$short_name\E/"; if ( $case_grade eq 'pass' ) { unlike( $stdout, $ctr_regex , "$case->{name}: report notification correct" ) and $is_grade_correct++; ok( ! defined $Helper::sent_report, "$case->{name}: results not sent" ); } else { like( $stdout, $ctr_regex , "$case->{name}: report notification correct" ) and $is_grade_correct++; if ( -r $config_file ) { ok( defined $Helper::sent_report && length $Helper::sent_report, "$case->{name}: report was mock sent" ); } else { ok( ! defined $Helper::sent_report, "$case->{name}: results not sent" ); } } } _diag_output( $stdout, $stderr ) unless ( $is_rc_correct && $is_grade_correct ); } #SKIP } #for } #--------------------------------------------------------------------------# # Test grade_test #--------------------------------------------------------------------------# sub test_grade_test_iter_plan() { 7 } sub test_grade_test_plan() { 2 * test_grade_test_iter_plan() } sub test_grade_test { my ($case, $dist) = @_; local $Test::Builder::Level = $Test::Builder::Level + 1; local $ENV{PERL_MM_USE_DEFAULT} = 1; my $short_name = _short_name( $dist ); for my $tool ( qw/eumm mb/ ) { SKIP: { my ($have_tool,$tool_mod,$tool_PL) = @{$tool_constants{$tool}}{qw/have module PL/}; my $tool_cmd = $tool eq 'eumm' ? "$make test" : "$perl Build test" ; my $tool_label = $tool eq 'eumm'? "make test" : "perl Build test" ; skip "$tool_mod not installed or working", test_grade_test_iter_plan() if ! $have_tool; my $tempd = _ok_clone_dist_dir( $case->{name} ); $Helper::sent_report = undef; $Helper::comments = undef; my ($stdout, $stderr, $build_err, $test_build_rc); ($stdout, $stderr) = capture { $build_err = system("$perl $tool_PL"); }; ok( ! $build_err, "$case->{name}: $tool_PL successful" ) or do { _diag_output( $stdout, $stderr ); skip "$tool_PL failed", test_grade_test_iter_plan() - 1; }; eval { ($stdout, $stderr) = capture { $test_build_rc = CPAN::Reporter::test( $dist, $tool_cmd ) }; }; if ( $@ ) { diag "DIED WITH:\n$@"; _diag_output( $stdout, $stderr ); skip "test() died", test_grade_test_iter_plan() - 1; } my $is_rc_correct = $case->{"$tool\_success"} ? $test_build_rc : ! $test_build_rc; ok( $is_rc_correct, "$case->{name}: '$tool_label' returned " . $case->{"$tool\_success"} ); # Grade evaluation with special case if discarding my ($found_grade_result, $found_msg) = ( $stdout =~ /^CPAN::Reporter: (Test result[^,]+), ([^\n]+)[.:]$/ims ); if ( $case->{"$tool\_grade"} eq 'discard' ) { is ($found_grade_result, "test results were not valid", "$case->{name}: '$tool_label' prerequisites not satisifed" ); like( $stdout, "/Test report will not be sent/", "$case->{name}: discard message correct" ); ok( ! defined $Helper::sent_report, "$case->{name}: test results discarded" ); } else { my $case_grade = $case->{"$tool\_grade"}; my ($found_grade) = ( $found_grade_result =~ /Test result is '([^']+)'/ ); is( $found_grade, $case_grade, "$case->{name}: '$tool_label' grade reported as '$case_grade'" ) or _diag_output( $stdout, $stderr ); like( $stdout, "/preparing a CPAN Testers report for \Q$short_name\E/", "$case->{name}: report notification correct" ); if ( -r $config_file ) { ok( defined $Helper::sent_report && length $Helper::sent_report, "$case->{name}: test report was mock sent" ); } else { ok( ! defined $Helper::sent_report, "$case->{name}: test results not sent" ); } } # Grade explanation message is( $found_msg, $case->{"$tool\_msg"} ? $case->{"$tool\_msg"} : q{}, "$case->{name}: '$tool_label' grade explanation correct" ); } #SKIP } #for } #--------------------------------------------------------------------------# # report tests #--------------------------------------------------------------------------# my %report_para = ( 'pass' => <<'HERE', Thank you for uploading your work to CPAN. Congratulations! All tests were successful. HERE 'fail' => <<'HERE', Thank you for uploading your work to CPAN. However, there was a problem testing your distribution. If you think this report is invalid, please consult the CPAN Testers Wiki for suggestions on how to avoid getting FAIL reports for missing library or binary dependencies, unsupported operating systems, and so on: http://wiki.cpantesters.org/wiki/CPANAuthorNotes HERE 'unknown' => << 'HERE', Thank you for uploading your work to CPAN. However, attempting to test your distribution gave an inconclusive result. This could be because your distribution had an error during the make/build stage, did not define tests, tests could not be found, because your tests were interrupted before they finished, or because the results of the tests could not be parsed. You may wish to consult the CPAN Testers Wiki: http://wiki.cpantesters.org/wiki/CPANAuthorNotes HERE 'na' => << 'HERE', Thank you for uploading your work to CPAN. While attempting to build or test this distribution, the distribution signaled that support is not available either for this operating system or this version of Perl. Nevertheless, any diagnostic output produced is provided below for reference. If this is not what you expect, you may wish to consult the CPAN Testers Wiki: http://wiki.cpantesters.org/wiki/CPANAuthorNotes HERE ); sub test_report_plan() { 17 }; sub test_report { local $Test::Builder::Level = $Test::Builder::Level + 1; my ($case) = @_; my $label = "$case->{label}:"; my $expected_grade = $case->{expected_grade}; my $prereq = CPAN::Reporter::_prereq_report( $case->{dist} ); my $msg_re = $report_para{ $expected_grade }; my $default_comment = $ENV{AUTOMATED_TESTING} ? "this report is from an automated smoke testing program\nand was not reviewed by a human for accuracy" : "none provided" ; my $tempd = _ok_clone_dist_dir( $case->{name} ); my $commentfile = File::Spec->catfile( $config_dir, 'comment.txt' ); if ( $case->{comment_txt} ) { if (! $ENV{AUTOMATED_TESTING} ) { $default_comment = ''; } else { $default_comment .= "\n\n"; } $default_comment .= "TEST COMMENT IN\nCOMMENT FILE"; open my $fh, '>', $commentfile; print $fh $default_comment; close $fh; ok (-e $commentfile, "$label created comment.txt file"); } else { ok (! -e $commentfile, "$label comment.txt does not exist"); } my ($stdout, $stderr, $err, $test_output) = _run_report( $case ); if ( $case->{comment_txt} ) { unlink($commentfile); } ok (! -e $commentfile, "$label comment.txt removed if needed"); is( $err, q{}, "$label report ran without error" ); ok( defined $msg_re && length $msg_re, "$label found '$expected_grade' grade paragraph" ); # set PERL_MM_USE_DEFAULT to mirror _run_report local $ENV{PERL_MM_USE_DEFAULT} = 1; my $env_vars = CPAN::Reporter::_env_report(); my $special_vars = CPAN::Reporter::_special_vars_report(); my $toolchain_versions = CPAN::Reporter::_toolchain_report(); like( $Helper::sent_report, '/' . quotemeta($msg_re) . '/ms', "$label correct intro paragraph" ); like( $Helper::sent_report, '/' . quotemeta($default_comment) . '/ms', "$label correct default comment" ); # Because we append comment.txt to the smoke test message when it is # tested with automation, we want to make sure this message is NOT # included when we aren't doing automated testing. if ( $ENV{AUTOMATED_TESTING} ) { like( $Helper::sent_report, '/automated smoke testing/ms', "$label comment includes smoke testing notice" ); } else { unlike( $Helper::sent_report, '/automated smoke testing/ms', "$label comment does not include smoke testing notice" ); } # Because we don't append the standard default message if we have a # comment.txt, we want to make sure it is not there. if ( $ENV{AUTOMATED_TESTING} ) { unlike( $Helper::sent_report, '/none provided/ms', "$label comment does not include 'none provided'" ); } else { if ( $case->{comment_txt} ) { unlike( $Helper::sent_report, '/none provided/ms', "$label comment does not include 'none provided'" ); } else { like( $Helper::sent_report, '/none provided/ms', "$label comment does include 'none provided'" ); } } like( $Helper::sent_report, '/' . quotemeta($prereq) . '/ms', "$label found prereq report" ); like( $Helper::sent_report, '/' . quotemeta($env_vars) . '/ms', "$label found environment variables" ); like( $Helper::sent_report, '/' . quotemeta($special_vars) . '/ms', "$label found special variables" ); like( $Helper::sent_report, '/' . quotemeta($toolchain_versions) . '/ms', "$label found toolchain versions found" ); my $joined_output = join("", @$test_output); # extract just the test output my $found_test_output = q{}; if ( $Helper::sent_report =~ m/ ^Output\ from\ '[^\']+':\n # lead-in to test output ^\n # blank line ^(.+) \n # test output ending in newline ^------------------------------ \n # separator ^PREREQUISITES \n # next section /xms ) { $found_test_output = $1; } my $orig_found_length = length $found_test_output; ok( $orig_found_length, "$label located test output in report" ); # if output appears longer than max, the excess should only be the # error message, so look for it, strip it and check it my $length_error = q{}; my $max_in_k = int($max_report_length / 1000) . "K"; if ( $found_test_output =~ m/ ^(.+)\n # test output ending in a newline ^\n # blank line ^(\[[^\n]+\]) \n # stuff in brackets ^\n # blank line \z /xms ) { $found_test_output = $1; $length_error = $2; } if ( length $joined_output > $max_report_length ) { is( $length_error, "[Output truncated after $max_in_k]", "$label truncated length error message correct" ) } else { pass( "$label no truncation message seen" ); } # after extracting error, if any, the output should now be # less than the max length my $found_length = length $found_test_output; ok( $found_length <= $max_report_length, "$label test_output less than or equal to maximum length" ) or diag "length $found_length > $max_report_length"; # confirm that we indeed got the test output we expected # (whether all or just a truncated portion) if ( length $joined_output > $max_report_length ) { $joined_output = substr( $joined_output, 0, $max_report_length ); } like( $Helper::sent_report, '/' . quotemeta($joined_output) . '/ms', "$label found output matches expected output" ); return ($stdout, $stderr, $err, $test_output); }; #--------------------------------------------------------------------------# # test_dispatch # # case requires # label -- prefix for text output # dist -- mock dist object # name -- name for t/dist/name to copy # command -- command to execute within copy of dist dir # phase -- phase of PL/make/test to pass command results to #--------------------------------------------------------------------------# sub test_dispatch_plan { 4 }; sub test_dispatch { local $Test::Builder::Level = $Test::Builder::Level + 1; my $case = shift; my %opt = @_; my $tempd = _ok_clone_dist_dir( $case->{name} ); local $case->{dist}{build_dir} = "$tempd"; my ($stdout, $stderr, $err) = _run_report( $case ); is( $err, q{}, "generate report for $case->{label}" ); if ( $opt{will_send} ) { ok( defined $Helper::sent_report && length $Helper::sent_report, "report was sent for $case->{label}" ); like( $stdout, "/sending test report with/", "saw report sent message for $case->{label}" ); } else { ok( ! defined $Helper::sent_report, "report not sent for $case->{label}" ); like( $stdout, "/report will not be sent/", "saw report not sent message for $case->{label}" ); } return ($stdout, $stderr, $err); } #--------------------------------------------------------------------------# # _diag_output #--------------------------------------------------------------------------# sub _diag_output { my ( $stdout, $stderr ) = @_; diag "STDOUT:\n$stdout\n\nSTDERR:\n$stderr\n"; } #--------------------------------------------------------------------------# # _dircopy #--------------------------------------------------------------------------# sub _dircopy { my ($orig, $new) = @_; my $count = 0; File::Find::find({ no_chdir => 1, wanted => sub { my $orig_path = $_; my $new_path = File::Spec->rel2abs(File::Spec->abs2rel($orig_path, $orig), $new); if (-d $orig_path) { mkdir $new_path; } elsif (-f _) { copy($orig_path, $new_path) or die $!; } $count++; }, }, $orig); return $count; } #--------------------------------------------------------------------------# # _ok_clone_dist_dir #--------------------------------------------------------------------------# sub _ok_clone_dist_dir { local $Test::Builder::Level = $Test::Builder::Level + 1; my $dist_name = shift; my $dist_dir = File::Spec->rel2abs( File::Spec->catdir( $corpus_dir, $dist_name ) ); my $work_dir = tempd() or die "Couldn't create temporary distribution dir: $!\n"; ok( defined( _dircopy($dist_dir, "$work_dir") ), "Copying $dist_name to temp directory $work_dir" ) or diag $!; return $work_dir; } #--------------------------------------------------------------------------# # _run_report #--------------------------------------------------------------------------# sub _run_report { my $case = shift; my $phase = $case->{phase}; # automate CPAN::Reporter prompting local $ENV{PERL_MM_USE_DEFAULT} = 1; my ($stdout, $stderr, $output, $exit_value); $Helper::sent_report = undef; $Helper::comments = undef; eval { ($stdout, $stderr) = capture { # run any preliminaries to the command we want to record if ( $phase eq 'make' || $phase eq 'test' ) { system("$perl Makefile.PL"); } if ( $phase eq 'test' ) { system("$make"); } ($output, $exit_value) = CPAN::Reporter::record_command( $case->{command} ); no strict 'refs'; &{"CPAN::Reporter::grade_$phase"}( $case->{dist}, $case->{command}, $output, $exit_value, ); }; }; if ( $@ ) { diag "DIED WITH:\n$@"; _diag_output( $stdout, $stderr ); } return ($stdout, $stderr, $@, $output); } #--------------------------------------------------------------------------# # _short_name #--------------------------------------------------------------------------# sub _short_name { my $dist = shift; my $short_name = basename($dist->pretty_id); $short_name =~ s/(\.tar\.gz|\.tgz|\.zip)$//i; return $short_name; } #--------------------------------------------------------------------------# # Mocking #--------------------------------------------------------------------------# BEGIN { $INC{"Test/Reporter.pm"} = 1; # fake load } package Test::Reporter; use vars qw/$AUTOLOAD $VERSION/; $VERSION = 999; # more than 1.54 (e.g. distfile exists) sub new { return bless {}, 'Test::Reporter::Mocked' } package Test::Reporter::Mocked; use Config; use vars qw/$AUTOLOAD/; sub comments { shift; $Helper::comments = shift } sub send { shift; $Helper::sent_report = $Helper::comments; return 1; } sub subject { my $self = shift; return uc($self->grade) . ' ' . $self->distribution . " $Config{archname} $Config{osvers}"; } my %mocked_data; my @valid_transport = qw/Metabase Mail::Send/; sub transport { my ($self) = shift; if (@_) { my $t = shift; die __PACKAGE__ . ":transport: '$t' is invalid\n" unless grep { $t eq $_ } @valid_transport; $mocked_data{transport} = $t; } return $mocked_data{transport}; } sub AUTOLOAD { my $self = shift; if ( @_ ) { $mocked_data{ $AUTOLOAD } = shift; } return $mocked_data{ $AUTOLOAD }; } 1; 05_prompting.t100644000765000024 263714423611161 16414 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use Helper; use Frontend; use Capture::Tiny qw/capture/; my @cases = ( "default:yes", "default:no", "default:ask/yes", "default:ask/no", "default:ask/no fail:ask/yes na:yes unknown:no", ); plan tests => 1 + 4 * @cases; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my $option_name = "edit_report"; my ($got); #--------------------------------------------------------------------------# # Begin tests #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); local $ENV{PERL_MM_USE_DEFAULT} = 1; for my $c ( @cases ) { my $config = { $option_name => $c }; my $parsed = CPAN::Reporter::Config::_validate_grade_action_pair( $option_name, $c ); for my $grade ( qw/pass fail na unknown/ ) { capture { $got = CPAN::Reporter::_prompt( $config, $option_name, $grade ); }; my $expected = $parsed->{$grade} || $parsed->{default}; # convert ask/* to * $expected =~ s{ask/?}{}; $expected = "no" if not length $expected; is( $got, $expected , "'$c' for '$grade'" ); } } 10_prereq_pm.t100644000765000024 1362114423611161 16376 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use MockCPANDist; use Helper; use Frontend; use Config; my @prereq_cases = ( #module #need #have #ok? [ 'Bogus::Found', 1.23, 3.14, 1 ], [ 'Bogus::Shadow', 3.14, 3.14, 1 ], [ 'Bogus::NotFound', 1.49, "n/a", 0 ], [ 'Bogus::TooOld', 2.72, 0.01, 0 ], [ 'Bogus::NoVersion', 0, 0, 1 ], [ 'Bogus::GTE', '>= 3.14', 3.14, 1 ], [ 'Bogus::GT', '>3.14', 3.14, 0 ], [ 'Bogus::LTE', '<= 3.15', 3.14, 1 ], [ 'Bogus::LT', '<3.14', 3.14, 0 ], [ 'Bogus::Conflict', '!= 3.14', 3.14, 0 ], [ 'Bogus::Complex', '>= 3, !=3.14, < 4', 3.14, 0 ], [ 'Bogus::Broken', '0', 'broken', 0 ], [ 'perl', 5.00, $], 1 ], ); my @scenarios = ( #[ "old CPAN-style", undef ], # undef is signal and helps keep count [ "only one", qw/requires/ ], [ "only one", qw/build_requires/ ], [ "both types", qw/requires build_requires/ ], ); my $scenario_count; $scenario_count += @$_ - 1 for @scenarios; plan tests => 2 + test_fake_config_plan() + $scenario_count * ( 1 + 4 * @prereq_cases ); #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my %prereq_pm = map { @{$_}[0,1] } @prereq_cases; my ($module_width, $prereq_width) = (0,0); for my $case ( @prereq_cases ) { $module_width = length $case->[0] if length $case->[0] > $module_width; $prereq_width = length $case->[1] if length $case->[1] > $prereq_width; } my $expect_regex = '\s+(!|\s)\s' . '(.{' . $module_width . '})\s' . '(.{' . $prereq_width . '})\s(\S+)'; # \s+ leading spaces # (!|\s) capture bang or space # \s separator space # (.{N}) module name # \s separator space # (.{N}) module version needed # \s separator space # (\S+) module version found my @mock_defaults = ( pretty_id => "JOHNQP/Bogus-Module-1.23.tar.gz", author_id => "JOHNQP", author_fullname => "John Q. Public", ); my ($got, @got, $expect); #--------------------------------------------------------------------------# # Begin tests #--------------------------------------------------------------------------# my $perl5lib = File::Spec->rel2abs( File::Spec->catdir( qw/ t perl5lib / ) ); my $shadowlib = File::Spec->rel2abs( File::Spec->catdir( qw/ t perl5lib-shadow / ) ); local $ENV{PERL5LIB} = join $Config{path_sep}, $perl5lib, $shadowlib, $ENV{PERL5LIB}; require_ok('CPAN::Reporter'); test_fake_config(); #--------------------------------------------------------------------------# # Test no prereq #--------------------------------------------------------------------------# { my $mock_dist = MockCPANDist->new( @mock_defaults, prereq_pm => { }, ); $got = CPAN::Reporter::_prereq_report( $mock_dist ); like( $got, '/^\s*No requirements found\s*$/ms', "No requirements specified message correct" ); } #--------------------------------------------------------------------------# # Scenario testing #--------------------------------------------------------------------------# for my $scene ( @scenarios ) { my ($label, @keys ) = @$scene; # initialize -- we need to have both keys for CPAN::Reporter # to detect new CPAN style my %scenario_prereq = ( requires => undef, build_requires => undef, ); # load up prereqs into one or more keys (new style) or replace # %scenario_prereq if old, flat style if ( @keys ) { if ( defined $keys[0] ) { $scenario_prereq{$_} = { %prereq_pm } for @keys; } else { # do it old style, but set up $keys[0] to act like "requires" # for analysis of output %scenario_prereq = %prereq_pm; $keys[0] = 'requires'; } } my $mock_dist = MockCPANDist->new( @mock_defaults, prereq_pm => { %scenario_prereq }, ); $got = CPAN::Reporter::_prereq_report( $mock_dist ); # diag $got; @got = split /\n+/ms, $got; for my $prereq_type ( @keys ) { like( shift( @got), '/^' . $prereq_type . ':\s*$/ms', "$label: '$prereq_type' header" ); # Dump header lines splice( @got, 0, 2 ); for my $case ( sort { lc $a->[0] cmp lc $b->[0] } @prereq_cases ) { my ($exp_module, $exp_need, $exp_have, $exp_ok) = @$case; my $line = shift(@got); my ($bang, $module, $need, $have) = ( $line =~ /^$expect_regex\s*$/ms ); # trim trailing spaces from fixed-width captures $module =~ s/\s*$//; $need =~ s/\s*$//; is( $module, $exp_module, "$label ($prereq_type): found '$exp_module' in report" ); is( $bang, ($exp_ok ? ' ' : '!'), "$label ($prereq_type): '$exp_module' flag correct" ) or diag "LINE: $line"; is( $exp_need, $need, "$label ($prereq_type): '$exp_module' needed version correct" ) or diag "LINE: $line"; # Check numerically, too, since version.pm/bleadperl will make # 1.2 into 1.200 ok( $exp_have eq $have || $exp_have == $have, "$label ($prereq_type): '$exp_module' installed version correct" ) or diag "LINE: $line"; } } } 30_PL_report.t100644000765000024 567714423611161 16310 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use MockCPANDist; use Helper; use Frontend; my $lt_5006 = $] < 5.006; my @test_distros = ( { name => 't-Pass', eumm_success => 1, eumm_grade => "pass", eumm_msg => "No errors", mb_success => 1, mb_grade => "pass", mb_msg => "No errors", }, { name => 'PL-Fail', eumm_success => 0, eumm_grade => "unknown", eumm_msg => "Stopped with an error", mb_success => 0, mb_grade => "unknown", mb_msg => "Stopped with an error", }, { name => 'PL-RequirePerl', eumm_success => 0, eumm_grade => "na", eumm_msg => "Perl version too low", mb_success => 0, mb_grade => "na", mb_msg => "Perl version too low", }, { name => 'PL-MIRequirePerl', eumm_success => 0, eumm_grade => "na", eumm_msg => "Perl version too low", mb_success => 0, mb_grade => "na", mb_msg => "Perl version too low", }, { name => 'PL-OSUnsupported', eumm_success => 0, eumm_grade => "na", eumm_msg => "This platform is not supported", mb_success => 0, mb_grade => "na", mb_msg => "This platform is not supported", }, { name => 'PL-warn-OSUnsupported', eumm_success => 0, eumm_grade => "na", eumm_msg => "This platform is not supported", mb_success => 0, mb_grade => "na", mb_msg => "This platform is not supported", }, { name => 't-PrereqPerl-NOK-our', prereq => { perl => 42 }, eumm_success => $lt_5006 ? 0 : 1, eumm_grade => $lt_5006 ? "na" : "pass", eumm_msg => $lt_5006 ? "Perl version too low" : "No errors", mb_success => $lt_5006 ? 0 : 1, mb_grade => $lt_5006 ? "na" : "pass", mb_msg => $lt_5006 ? "Perl version too low" : "No errors", }, ); plan tests => 1 + test_fake_config_plan() + test_grade_PL_plan() * @test_distros; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my %mock_dist_args = ( pretty_id => "JOHNQP/Bogus-Module-1.23.tar.gz", prereq_pm => { requires => { 'File::Spec' => 0 }, }, author_id => "JOHNQP", author_fullname => "John Q. Public", ); #--------------------------------------------------------------------------# # tests #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); test_fake_config(); for my $case ( @test_distros ) { my $mock_dist = MockCPANDist->new( %mock_dist_args, %{$case->{prereq_pm}} ); test_grade_PL( $case, $mock_dist ); } 64_transport.t100644000765000024 467314423611161 16440 0ustar00garustaff000000000000CPAN-Reporter-1.2019/tuse strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use MockCPANDist; use Helper; use Frontend; use Config; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my $make = $Config{make}; my $mock_dist = MockCPANDist->new( pretty_id => "JOHNQP/Bogus-Module-1.23.tar.gz", prereq_pm => { requires => { 'File::Spec' => 0 }, }, author_id => "JOHNQP", author_fullname => "John Q. Public", ); my $case = { label => "t-Pass", name => "t-Pass", dist => $mock_dist, version => 1.23, grade => "pass", phase => "test", command => "$make test", will_send => 1, options => { send_report => "yes", }, }; plan tests => 1 + 4 * (1 + test_fake_config_plan + test_dispatch_plan); #--------------------------------------------------------------------------# # tests #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); #--------------------------------------------------------------------------# # no transport advanced option set #--------------------------------------------------------------------------# test_fake_config( %{$case->{options}} ); test_dispatch( $case, will_send => $case->{will_send}, ); is( Test::Reporter::Mocked->transport(), 'Metabase', "by default, transport should be be set to Metabase" ); #--------------------------------------------------------------------------# # transport set in config #--------------------------------------------------------------------------# for my $transport ( qw/Metabase Mail::Send/ ) { test_fake_config( %{$case->{options}}, transport => $transport ); test_dispatch( $case, will_send => $case->{will_send}, ); is( Test::Reporter::Mocked->transport(), $transport, "transport $transport in config was properly set" ); } #--------------------------------------------------------------------------# # invalid transport #--------------------------------------------------------------------------# test_fake_config( %{$case->{options}}, transport => 'LWP' ); my ($stdout, $stderr) = test_dispatch( $case, will_send => 0, ); like( $stdout, "/'LWP' is invalid/", "saw invalid transport warnings" ); 73_autoflush.t100644000765000024 247414423611161 16413 0ustar00garustaff000000000000CPAN-Reporter-1.2019/tuse strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use Capture::Tiny qw/capture/; use File::Spec::Functions qw/catdir catfile rel2abs/; use lib 't/lib'; use Frontend; use MockHomeDir; use Probe::Perl (); # protect CPAN::Reporter from itself local %ENV = %ENV; delete $ENV{PERL5OPT}; my @cases = ( [ 'Makefile.PL' , 1 ], [ 'NotMakefile.PL' , 0 ], [ 'Build.PL' , 1 ], [ 'NotBuild.PL' , 0 ], ); plan tests => 1 + @cases; #--------------------------------------------------------------------------# # fixtures #--------------------------------------------------------------------------# my $perl = Probe::Perl->find_perl_interpreter(); $perl = qq{"$perl"}; my ($stdout, $stderr, $output, $exit, $line); #--------------------------------------------------------------------------# # tests #--------------------------------------------------------------------------# require_ok( "CPAN::Reporter" ); for my $c ( @cases ) { my ($name, $expect) = @$c; my $bin = catfile( qw/t bin /, $name ); eval { ($stdout, $stderr) = capture { ($output, $exit) = CPAN::Reporter::record_command( "$perl $bin" ); }; }; chomp( $line = $output->[0] ); is( $line, $expect, "$name had \$| = $expect" ) or diag $stdout; } CONTRIBUTING.mkdn100644000765000024 575114423611161 16223 0ustar00garustaff000000000000CPAN-Reporter-1.2019## HOW TO CONTRIBUTE Thank you for considering contributing to this distribution. This file contains instructions that will help you work with the source code. The distribution is managed with Dist::Zilla. This means than many of the usual files you might expect are not in the repository, but are generated at release time, as is much of the documentation. Some generated files are kept in the repository as a convenience (e.g. Makefile.PL or cpanfile). Generally, **you do not need Dist::Zilla to contribute patches**. You do need Dist::Zilla to create a tarball. See below for guidance. ### Getting dependencies If you have App::cpanminus 1.6 or later installed, you can use `cpanm` to satisfy dependencies like this: $ cpanm --installdeps . Otherwise, look for either a `Makefile.PL` or `cpanfile` file for a list of dependencies to satisfy. ### Running tests You can run tests directly using the `prove` tool: $ prove -l $ prove -lv t/some_test_file.t For most of my distributions, `prove` is entirely sufficient for you to test any patches you have. I use `prove` for 99% of my testing during development. ### Code style and tidying Please try to match any existing coding style. If there is a `.perltidyrc` file, please install Perl::Tidy and use perltidy before submitting patches. If there is a `tidyall.ini` file, you can also install Code::TidyAll and run `tidyall` on a file or `tidyall -a` to tidy all files. ### Patching documentation Much of the documentation Pod is generated at release time. Some is generated boilerplate; other documentation is built from pseudo-POD directives in the source like C<=method> or C<=func>. If you would like to submit a documentation edit, please limit yourself to the documentation you see. If you see typos or documentation issues in the generated docs, please email or open a bug ticket instead of patching. ### Installing and using Dist::Zilla Dist::Zilla is a very powerful authoring tool, optimized for maintaining a large number of distributions with a high degree of automation, but it has a large dependency chain, a bit of a learning curve and requires a number of author-specific plugins. To install it from CPAN, I recommend one of the following approaches for the quickest installation: # using CPAN.pm, but bypassing non-functional pod tests $ cpan TAP::Harness::Restricted $ PERL_MM_USE_DEFAULT=1 HARNESS_CLASS=TAP::Harness::Restricted cpan Dist::Zilla # using cpanm, bypassing *all* tests $ cpanm -n Dist::Zilla In either case, it's probably going to take about 10 minutes. Go for a walk, go get a cup of your favorite beverage, take a bathroom break, or whatever. When you get back, Dist::Zilla should be ready for you. Then you need to install any plugins specific to this distribution: $ cpan `dzil authordeps` $ dzil authordeps | cpanm Once installed, here are some dzil commands you might try: $ dzil build $ dzil test $ dzil xtest You can learn more about Dist::Zilla at http://dzil.org/ 11_env_config.t100644000765000024 607414423611161 16506 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use MockCPANDist; use Helper; use Frontend; use Config; # protect CPAN::Reporter from itself local %ENV = %ENV; delete $ENV{PERL5OPT}; # Entries bracketed with "/" are taken to be a regex; otherwise literal my @env_vars= qw( /PERL/ /LC_/ LANG LANGUAGE PATH SHELL COMSPEC TERM AUTOMATED_TESTING AUTHOR_TESTING INCLUDE LIB LD_LIBRARY_PATH PROCESSOR_IDENTIFIER NUMBER_OF_PROCESSORS ); my @env_vars_found; for my $var ( @env_vars ) { if ( $var =~ m{^/(.+)/$} ) { push @env_vars_found, grep { /$1/ } keys %ENV; } else { push @env_vars_found, $var if exists $ENV{$var}; } } my %special_vars = ( '$^X' => $^X, '$UID/$EUID' => "$< / $>", '$GID' => "$(", '$EGID' => "$)", ); if ( $^O eq 'MSWin32' && eval "require Win32" ) { my @getosversion = Win32::GetOSVersion(); my $getosversion = join(", ", @getosversion); $special_vars{"Win32::GetOSName"} = Win32::GetOSName(); $special_vars{"Win32::GetOSVersion"} = $getosversion; $special_vars{"Win32::IsAdminUser"} = Win32::IsAdminUser(); } my @toolchain_modules = qw( CPAN Module::Build ExtUtils::MakeMaker version ); # paths # * cwd # * compiler # * $Config{make} # special handling # * umask # * locale -- how do I determine this? # * compiler tools versions plan tests => 1 + test_fake_config_plan() + 2 * @env_vars_found + 2* keys %special_vars; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my ($got, $expect); #--------------------------------------------------------------------------# # Begin tests #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); test_fake_config(); #--------------------------------------------------------------------------# # ENV testing #--------------------------------------------------------------------------# $got = CPAN::Reporter::_env_report(); { for my $var ( sort @env_vars_found ) { my ($name, $value) = ( $got =~ m{^ +(\Q$var\E) = ([^\n]*?)$}ms ); is( $name, $var, "found \$ENV{$var}" ); is( defined $value ? $value : '', defined $ENV{$var} ? $ENV{$var} : '', "value of \$ENV{$var} is correct" ); } } #--------------------------------------------------------------------------# # Special Vars #--------------------------------------------------------------------------# $got = CPAN::Reporter::_special_vars_report(); for my $var ( sort keys %special_vars ) { my ($name, $value) = ( $got =~ m{ +(\Q$var\E) += +([^\n]*?)$}ms ); is( $name, $var, "found special variable $var" ); is( defined $value ? $value : '', defined $special_vars{$var} ? $special_vars{$var} : '', "value of $var is correct" ); } Makefile.PL100644000765000024 6514423611161 16357 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/binuse strict; print( ($| ? "1" : "0"), "\n" ); exit; NotBuild.PL100644000765000024 6514423611161 16362 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/binuse strict; print( ($| ? "1" : "0"), "\n" ); exit; Frontend.pm100644000765000024 122214423611161 16554 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/libpackage Frontend; use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } use ExtUtils::MakeMaker (); BEGIN { $INC{"CPAN.pm"} = 1; #fake load $INC{"Test/Reporter/Transport/Metabase.pm"} = 1; #fake load $CPAN::VERSION = 999; $Test::Reporter::Transport::Metabase::VERSION = 999; $CPAN::Reporter::VERSION ||= 999; $CPAN::Reporter::History::VERSION ||= 999; } package CPAN::Shell; sub myprint { shift; print @_; } sub mywarn { shift; print @_; } sub colorable_makemaker_prompt { goto \&ExtUtils::MakeMaker::prompt; } package CPAN; $CPAN::Frontend = $CPAN::Frontend = "CPAN::Shell"; 1; 03_config_file.t100644000765000024 2545014423611161 16655 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use Config::Tiny; use Capture::Tiny qw/capture/; use File::Basename qw/basename/; use File::Glob qw/bsd_glob/; use File::Spec; use File::Temp; use File::Path qw/mkpath/; use lib 't/lib'; use Frontend; use MockHomeDir; plan tests => 62; #plan 'no_plan'; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my $config_dir = File::Spec->catdir( MockHomeDir::home_dir, ".cpanreporter" ); my $config_file = File::Spec->catfile( $config_dir, "config.ini" ); my $metabase_file = File::Spec->catfile( $config_dir, 'metabase_id.json' ); my $default_options = { email_from => '', edit_report => 'default:ask/no pass/na:no', send_report => 'default:ask/yes pass/na:yes', transport => "Metabase uri https://metabase.cpantesters.org/api/v1/ id_file metabase_id.json", # send_duplicates => 'default:no', }; my @additional_prompts = (); my ($rc, $stdout, $stderr); #--------------------------------------------------------------------------# # Mocking -- override support/system functions #--------------------------------------------------------------------------# { # touch our mock metabase_id.json file mkpath $config_dir; # 2-args open with bare descriptor to work in older perls open METABASE, ">$metabase_file"; close METABASE; ok -r $metabase_file, 'created mock metabase file for testing'; } #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); require_ok('CPAN::Reporter::Config'); is( CPAN::Reporter::Config::_get_config_dir(), $config_dir, "get config dir path" ); is( CPAN::Reporter::Config::_get_config_file(), $config_file, "get config file path" ); # id_file normalizations my @id_file_cases = ( [ $metabase_file => $metabase_file ], [ 'metabase_id.json' => $metabase_file ], [ '/other/path.json' => '/other/path.json' ], [ 'other.json' => File::Spec->catfile( $config_dir, 'other.json' )], [ '~/other.json' => File::Spec->catfile( $^O eq 'MSWin32' ? File::HomeDir->my_home : bsd_glob('~'), 'other.json' )], ); for my $c ( @id_file_cases ) { is( CPAN::Reporter::Config::_normalize_id_file( $c->[0] ), $c->[1], "normalize id_file: $c->[0]" ); } ok( ! -f $config_file, "no config file yet" ); my $ret; ($stdout, $stderr) = capture { $ret = CPAN::Reporter::Config::_open_config_file(); }; is( $ret, undef, "opening non-existent file returns undef" ); like( $stdout, "/couldn't read configuration file/ms", "opening non-existent file gives a warning" ); { local $ENV{PERL_MM_USE_DEFAULT} = 1; # use prompt defaults eval { ( $stdout, $stderr ) = capture { $rc = CPAN::Reporter::configure() }; ok( $rc, "configure() returned true" ); }; diag "STDOUT:\n$stdout\nSTDERR:$stderr\n" if $@; } for my $option ( keys %$default_options, @additional_prompts) { like( $stdout, "/$option/", "saw '$option' configuration prompt" ); } is( ref $rc, 'HASH', "configure() returned a hash reference" ); is_deeply( $rc, $default_options, "configure return value has expected defaults" ); ok( -f $config_file, "configuration successfully created a config file" ); my $new_config = Config::Tiny->read( $config_file ); is_deeply( $new_config->{_}, $default_options, "newly created config file has expected defaults" ); #--------------------------------------------------------------------------# # check error handling if not readable #--------------------------------------------------------------------------# my $original_mode = (stat $config_file)[2] & 07777; chmod 0, $config_file ; SKIP: { skip "Couldn't set config file unreadable; skipping related tests", 2 if -r $config_file; { local $ENV{PERL_MM_USE_DEFAULT} = 1; # use prompt defaults my $ret; ($stdout, $stderr) = capture { $ret = CPAN::Reporter::configure() }; is( $ret, undef, "configure() is undef if file not readable" ); } like( $stdout, "/couldn't read configuration file/", "opening non-readable file gives a warning" ); } chmod $original_mode, $config_file; ok( -r $config_file, "config file reset to readable" ); #--------------------------------------------------------------------------# # check error handling if not writeable #--------------------------------------------------------------------------# chmod 0444, $config_file; SKIP: { skip "Couldn't set config file unwritable; skipping related tests", 2 if -w $config_file; { local $ENV{PERL_MM_USE_DEFAULT} = 1; # use prompt defaults my $ret; ($stdout, $stderr) = capture { $ret = CPAN::Reporter::configure() }; is( $ret, undef, "configure() is undef if file not writeable" ); } like( $stdout, "/error writing config file/", "opening non-writeable file gives a warning" ); } chmod $original_mode, $config_file; ok( -w $config_file, "config file reset to writeable" ); #--------------------------------------------------------------------------# # confirm configure() preserves existing #--------------------------------------------------------------------------# SKIP: { skip "Couldn't set config file writable again; skipping related tests", 8 if ! -w $config_file; my $bogus_email = 'nobody@nowhere.com'; my $bogus_smtp = 'mail.mail.com'; my $bogus_debug = 1; my $tiny = Config::Tiny->read( $config_file ); $tiny->{_}{email_from} = $bogus_email; $tiny->{_}{smtp_server} = $bogus_smtp; $tiny->{_}{debug} = $bogus_debug; ok( $tiny->write( $config_file ), "updated config file with a new email address and smtp server" ); { local $ENV{PERL_MM_USE_DEFAULT} = 1; # use prompt defaults my $ret; ($stdout, $stderr) = capture { $ret = CPAN::Reporter::configure() }; ok( $ret, "configure() ran again successfully" ); } like( $stdout, "/$bogus_email/", "pre-existing email address was seen during configuration prompts" ); like( $stdout, "/$bogus_smtp/", "pre-existing smtp server was seen during configuration prompts" ); like( $stdout, "/debug/", "pre-existing debug prompt was seen during configuration prompts" ); is( $tiny->{_}{email_from}, $bogus_email, "updated config file preserved email address" ); is( $tiny->{_}{smtp_server}, $bogus_smtp, "updated config file preserved smtp server" ); is( $tiny->{_}{debug}, $bogus_debug, "updated config file preserved debug value" ); } #--------------------------------------------------------------------------# # confirm _get_config_options handles bad action pair validation #--------------------------------------------------------------------------# SKIP: { skip "Couldn't set config file writable again; skipping additional tests", 4 if ! -w $config_file; my $bogus_email = 'nobody@nowhere.com'; my $bogus_smtp = 'mail.mail.com'; my $bogus_debug = 1; my $tiny = Config::Tiny->read( $config_file ); $tiny->{_}{email_from} = $bogus_email; $tiny->{_}{edit_report} = "invalid:invalid"; ok( $tiny->write( $config_file ), "updated config file with a bad edit_report setting" ); $tiny = Config::Tiny->read( $config_file ); my $parsed_config; ($stdout, $stderr) = capture { $parsed_config = CPAN::Reporter::Config::_get_config_options( $tiny ); }; like( $stdout, "/invalid option 'invalid:invalid' in 'edit_report'. Using default instead./", "bad option warning seen" ); is( $parsed_config->{edit_report}, "default:ask/no pass/na:no", "edit_report default returned" ); $tiny = Config::Tiny->read( $config_file ); is( $tiny->{_}{edit_report}, "invalid:invalid", "bad edit_report preserved in config.ini" ); delete $tiny->{_}{edit_report}; $tiny->write( $config_file ); } #--------------------------------------------------------------------------# # Test skipfile validation #--------------------------------------------------------------------------# SKIP: { skip "Couldn't set config file writable again; skipping other tests", 11 if ! -w $config_file; for my $skip_type ( qw/ send_skipfile cc_skipfile / ) { my $tiny = Config::Tiny->read( $config_file ); $tiny->{_}{$skip_type} = 'bogus.skipfile'; ok( $tiny->write( $config_file ), "updated config file with a bad $skip_type" ); $tiny = Config::Tiny->read( $config_file ); my $parsed_config; ($stdout, $stderr) = capture { $parsed_config = CPAN::Reporter::Config::_get_config_options( $tiny ); }; like( $stdout, "/invalid option 'bogus.skipfile' in '$skip_type'. Using default instead./", "bad $skip_type option warning seen" ); is( $parsed_config->{skipfile}, undef, "$skip_type default returned" ); $tiny = Config::Tiny->read( $config_file ); is( $tiny->{_}{$skip_type}, "bogus.skipfile", "bogus $skip_type preserved in config.ini" ); my $skipfile = File::Temp->new( TEMPLATE => "CPAN-Reporter-testskip-XXXXXXXX", DIR => File::Spec->tmpdir(), ); ok( -r $skipfile, "generated a $skip_type in the temp directory" ); $tiny->{_}{$skip_type} = "$skipfile"; ok( $tiny->write( $config_file ), "updated config file with an absolute $skip_type path" ); $tiny = Config::Tiny->read( $config_file ); ($stdout, $stderr) = capture { $parsed_config = CPAN::Reporter::Config::_get_config_options( $tiny ); }; is( $stdout, q{}, "absolute $skip_type ok" ); $skipfile = File::Temp->new( TEMPLATE => "CPAN-Reporter-testskip-XXXXXXXX", DIR => $config_dir, ); ok( -r $skipfile, "generated a $skip_type in the config directory" ); my $relative_skipfile = basename($skipfile); ok( ! File::Spec->file_name_is_absolute( $relative_skipfile ), "generated a relative $skip_type name" ); $tiny->{_}{$skip_type} = $relative_skipfile; ok( $tiny->write( $config_file ), "updated config file with a relative $skip_type path" ); $tiny = Config::Tiny->read( $config_file ); ($stdout, $stderr) = capture { $parsed_config = CPAN::Reporter::Config::_get_config_options( $tiny ); }; is( $stdout, q{}, "relative $skip_type ok" ); delete $tiny->{_}{$skip_type}; $tiny->write( $config_file ); } } 06_prompt_text.t100644000765000024 623414423611161 16760 0ustar00garustaff000000000000CPAN-Reporter-1.2019/tuse strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use MockCPANDist; use Helper; use Frontend; use Config; # For these tests, hide perl_patchlevel so all prompts are tested use MockPatchlevel; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my $perl = Probe::Perl->find_perl_interpreter(); $perl = qq{"$perl"}; my $make = $Config{make}; my $mock_dist = MockCPANDist->new( pretty_id => "JOHNQP/Bogus-Module-1.23.tar.gz", prereq_pm => { requires => { 'File::Spec' => 0 }, }, author_id => "JOHNQP", author_fullname => "John Q. Public", ); my $case = { label => "t-Fail", name => "t-Fail", dist => $mock_dist, version => 1.23, grade => "fail", phase => "test", command => "$make test", will_send => 1, }; my %prompts = ( edit_report => "Do you want to review or edit the test report?", send_report => "Do you want to send the report?", send_duplicates => "This report is identical to a previous one. Send it anyway?", ); my %phase_prompts = ( PL => "Do you want to send the PL report?", make => "Do you want to send the make/Build report?", test => "Do you want to send the test report?", ); my %phase_cmd = ( PL => "$perl Makefile.PL", make => "$make", test => "$make test", ); #--------------------------------------------------------------------------# # plan #--------------------------------------------------------------------------# # 7 my $config_plus_dispatch = test_fake_config_plan + test_dispatch_plan; plan tests => 2 + ( scalar keys %prompts ) + $config_plus_dispatch + (1 + $config_plus_dispatch) * (scalar keys %phase_prompts); #--------------------------------------------------------------------------# # tests #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); require_ok('CPAN::Reporter::History'); test_fake_config( edit_report => "ask/no", send_report => "ask/yes", send_duplicates => "ask/yes", ); # create a fake result to force send_duplicates prompt my $dummy_result = CPAN::Reporter::_init_result( "test", $mock_dist, "make test", "fake output", 1 ); $dummy_result->{grade} = "fail"; CPAN::Reporter::History::_record_history( $dummy_result ); # capture dispatch output my ($stdout, $stderr) = test_dispatch( $case, will_send => $case->{will_send}, ); # check output for prompts for my $p ( keys %prompts ) { like( $stdout, "/" . quotemeta($prompts{$p}) . "/m", "prompt for $p" ); } # check for per-phase prompts for my $p ( keys %phase_prompts ) { test_fake_config( "send_$p\_report" => "ask/yes" ); my $prefix = $p eq 'test' ? 't' : $p; $case->{name} = "$prefix-Fail"; $case->{phase} = $p; $case->{command} = $phase_cmd{$p}; ($stdout, $stderr) = test_dispatch( $case, will_send => $case->{will_send}, ); like( $stdout, "/" . $phase_prompts{$p} . "/m", "prompt for send_$p\_report" ); } 40_make_report.t100644000765000024 331314423611161 16674 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use MockCPANDist; use Helper; use Frontend; my @test_distros = ( { name => 't-Pass', eumm_success => 1, eumm_grade => "pass", eumm_msg => "No errors", mb_success => 1, mb_grade => "pass", mb_msg => "No errors", }, { name => 'make-Fail', eumm_success => 0, eumm_grade => "unknown", eumm_msg => "Stopped with an error", mb_success => 0, mb_grade => "unknown", mb_msg => "Stopped with an error", }, { name => 'make-RequirePerl', eumm_success => 0, eumm_grade => "na", eumm_msg => "Perl version too low", mb_success => 0, mb_grade => "na", mb_msg => "Perl version too low", }, ); plan tests => 1 + test_fake_config_plan() + test_grade_make_plan() * @test_distros; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my $mock_dist = MockCPANDist->new( pretty_id => "JOHNQP/Bogus-Module-1.23.tar.gz", prereq_pm => { requires => { 'File::Spec' => 0 }, }, author_id => "JOHNQP", author_fullname => "John Q. Public", ); #--------------------------------------------------------------------------# # tests #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); test_fake_config(); for my $case ( @test_distros ) { test_grade_make( $case, $mock_dist ); } 66_have_tested.t100644000765000024 1411614423611161 16712 0ustar00garustaff000000000000CPAN-Reporter-1.2019/tuse strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } use Test::More; use Config; use File::Copy qw/copy/; use File::Path qw/mkpath/; use File::Spec::Functions qw/catdir catfile rel2abs/; use File::Temp qw/tempdir/; use lib 't/lib'; use Frontend; use MockHomeDir; #plan 'no_plan'; plan tests => $Config{taint_disabled} ? 23 : 22; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my $config_dir = catdir( MockHomeDir::home_dir, ".cpanreporter" ); my $config_file = catfile( $config_dir, "config.ini" ); my $history_file = catfile( $config_dir, "reports-sent.db" ); my $sample_history_file = catfile(qw/t history reports-sent-longer.db/); my @fake_results = ( { dist_name => 'Baz-Bam-3.14', phase => 'test', grade => 'pass' }, { dist_name => 'Foo-Bar-1.23', phase => 'PL', grade => 'fail' }, { dist_name => 'Foo-Bar-1.23', phase => 'test', grade => 'fail' }, { dist_name => 'Foo-Bar-1.23', phase => 'test', grade => 'pass' }, { dist_name => 'Wibble-42', phase => 'test', grade => 'pass' }, { dist_name => 'Wobble-23', phase => 'PL', grade => 'na' }, { dist_name => 'Inline-0.44', phase => 'test', grade => 'pass' }, { dist_name => 'Crappy-0.01', phase => 'PL', grade => 'discard' }, ); #--------------------------------------------------------------------------## # begin testing #--------------------------------------------------------------------------# my @aoh; mkpath( $config_dir ); ok( -d $config_dir, "temporary config dir created" ); # If old history exists, convert it copy( $sample_history_file, $history_file); ok( -f $history_file, "copied sample old history file to config directory"); # make it writeable chmod 0644, $history_file; ok( -w $history_file, "history file is writeable" ); # load CPAN::Reporter::History and import have_tested for convenience require_ok( 'CPAN::Reporter::History' ); CPAN::Reporter::History->import( 'have_tested' ); # put in some data for current perl/arch/osname CPAN::Reporter::History::_record_history($_) for @fake_results; # one parameter should die eval { have_tested( 'Wibble-42' ) }; ok ( $@, "have_tested() dies with odd number of arguments" ); # unknown parameter shoudl die eval { have_tested( distname => 'Wibble-42' ) }; ok ( $@, "have_tested() dies with unknown parameter" ); # have_tested without any parameters should return everything on this platform @aoh = have_tested(); is( scalar @aoh, scalar @fake_results, "have_tested() with no args gives everything on this platform" ); # have_tested a dist that was only tested once - return AoH with only one hash @aoh = have_tested( dist => 'Wibble-42'); is( scalar @aoh, 1, "asking for a unique dist" ); is( ref $aoh[0], 'HASH', "returned an AoH" ); # we don't use _format_archname here because the test is checking both that # _format_archname is used correctly in the code and that it *works* correctly my $expected_archname = !$Config{taint_disabled} ? $Config{archname} : $Config{taint_disabled} eq 'silent' ? "$Config{archname}-silent-no-taint-support" : "$Config{archname}-no-taint-support"; is_deeply( $aoh[0], { phase => 'test', grade => 'PASS', dist => 'Wibble-42', perl => CPAN::Reporter::History::_format_perl_version(), archname => $expected_archname, osvers => $Config{osvers}, }, "hash fields as expected" ); if($Config{taint_disabled}) { like($aoh[0]->{archname}, qr/no-taint-support/, "taint is unsupported, and the history file agrees"); if($Config{taint_disabled} eq 'silent') { like($aoh[0]->{archname}, qr/silent-no-taint-support/, "... silently!"); } else { unlike($aoh[0]->{archname}, qr/silent-no-taint-support/, "... noisily!"); } } else { unlike($aoh[0]->{archname}, qr/no-taint-support/, "taint is supported, and the history file agrees"); } # just dist returns all reports for that dist on current platform @aoh = have_tested( dist => 'Foo-Bar-1.23' ); is( scalar @aoh, 3, "asking for multiple dist reports (only on this platform)" ); # just dist doesn't return reports from other platforms @aoh = have_tested( dist => 'ExtUtils-ParseXS-2.18' ); is( scalar @aoh, 0, "asking for multiple dist reports (with none on this platform)" ); # just phase returns all reports for that dist on current platform @aoh = have_tested( phase => 'test' ); is( scalar @aoh, 5, "asking for all test phase reports (defaults to this platform)" ); # just grade returns all reports of that grade on current platform @aoh = have_tested( grade => 'na' ); is( scalar @aoh, 1, "asking for all na grade reports (defaults to this platform)" ); # just grade returns all reports of that grade on current platform @aoh = have_tested( grade => 'NA' ); is( scalar @aoh, 1, "asking for all NA grade reports (defaults to this platform)" ); # just grade returns all reports of that grade on current platform @aoh = have_tested( grade => 'DISCARD' ); is( scalar @aoh, 1, "asking for all DISCARD grade reports (defaults to this platform)" ); # restrict to just a particular dist and phase @aoh = have_tested( dist => 'Foo-Bar-1.23', phase => 'test' ); is( scalar @aoh, 2, "asking for dist in test phase (defaults to this platform)" ); # dist reports on any platform @aoh = have_tested( dist => 'Inline-0.44', perl => q{}, archname => q{}, osvers => q{} ); is( scalar @aoh, 2, "asking for dist across any perl/archname/osvers" ); # restrict to a platform @aoh = have_tested( archname => 'not-a-real-archname', perl => q{}, osvers => q{} ); is( scalar @aoh, 12, "asking for all results from an archname" ); # restrict to a perl @aoh = have_tested( perl => '9.10.0', archname => q{}, osvers => q{} ); is( scalar @aoh, 9, "asking for all results from a perl version" ); # restrict to an osver @aoh = have_tested( perl => q{}, archname => q{}, osvers => q{another-fake-version} ); is( scalar @aoh, 3, "asking for all results from an OS version" ); author000755000765000024 014423611161 15226 5ustar00garustaff000000000000CPAN-Reporter-1.2019/xtcritic.t100644000765000024 20114423611161 17001 0ustar00garustaff000000000000CPAN-Reporter-1.2019/xt/author#!perl use strict; use warnings; use Test::Perl::Critic (-profile => "perlcritic.rc") x!! -e "perlcritic.rc"; all_critic_ok(); examples000755000765000024 014423611161 15107 5ustar00garustaff000000000000CPAN-Reporter-1.2019config.ini100644000765000024 45014423611161 17174 0ustar00garustaff000000000000CPAN-Reporter-1.2019/examples# example config.ini file cc_author=default:yes pass/na:no edit_report=default:ask/no pass/na:no email_from=DAGOLDEN send_duplicates=no send_report=default:ask/yes pass/na:yes # specify an internal mail server if direct mail sending is blocked smtp_server=mail.speakeasy.net 10_prereq_check.t100644000765000024 377014423611161 17023 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; my @load_pairs = (['Module::Install' => 0.90], ['Catalyst::DispatchType::Regex' => 5.90032], ['mylib' => undef], ['Acme::Fake' => undef]); plan tests => 6 + scalar @load_pairs; require_ok('CPAN::Reporter::PrereqCheck'); #--------------------------------------------------------------------------# # _try_load tests #--------------------------------------------------------------------------# for my $pair (@load_pairs) { my ($mod, $have) = @$pair; is(CPAN::Reporter::PrereqCheck::_try_load($mod, $have), 1, "_try_load for $mod"); } $INC{'Catalyst.pm'} = '/fake/path/Catalyst.pm'; is(CPAN::Reporter::PrereqCheck::_try_load('signatures', undef), 1, "_try_load for loading_conflicts"); delete $INC{'Catalyst.pm'}; my $try = CPAN::Reporter::PrereqCheck::_try_load('Test::More::Hooks', undef); $try ||= $@ =~ qr(Can't locate Test/More/Hooks\.pm); ok($try, "_try_load for load_before"); #--------------------------------------------------------------------------# # _run tests #--------------------------------------------------------------------------# use File::Temp 'tempfile'; my ($tfh, $tfn) = tempfile(UNLINK => 1); print $tfh <<_INPUT_; Completely::Bogus 0 Test::More 0,>=1,>2,<=3,<4,!=5 Test::More 0 perl _INPUT_ close $tfh; push @ARGV, $tfn; ## _run() uses <>; I tried writing to an in-memory ## variable first, but Devel::Cover reopens STDIN, ## which defeated the purpose of the test ## open stdout to a variable open OLDOUT, ">&", \*STDOUT; close STDOUT; my $output = ''; open STDOUT, ">", \$output; CPAN::Reporter::PrereqCheck::_run(); ## put things back open STDOUT, ">&", \*OLDOUT; like($output, qr(Completely::Bogus 0 n/a), "file is not installed"); like($output, qr(Test::More \d \d), "module found"); like($output, qr(perl 1 $]), "perl checked"); exit; CPAN000755000765000024 014423611161 14560 5ustar00garustaff000000000000CPAN-Reporter-1.2019/libReporter.pm100644000765000024 16426514423611161 17136 0ustar00garustaff000000000000CPAN-Reporter-1.2019/lib/CPANuse strict; package CPAN::Reporter; our $VERSION = '1.2019'; use Config; use Capture::Tiny qw/ capture tee_merged /; use CPAN 1.94 (); #CPAN.pm was split into separate files in this version #set minimum to it for simplicity use CPAN::Version (); use File::Basename qw/basename dirname/; use File::Find (); use File::HomeDir (); use File::Path qw/mkpath rmtree/; use File::Spec 3.19 (); use File::Temp 0.16 qw/tempdir/; use IO::File (); use Parse::CPAN::Meta (); use Probe::Perl (); use Test::Reporter 1.54 (); use CPAN::Reporter::Config (); use CPAN::Reporter::History (); use CPAN::Reporter::PrereqCheck (); use constant MAX_OUTPUT_LENGTH => 1_000_000; #--------------------------------------------------------------------------# # create temp lib dir for Devel::Autoflush # so that PERL5OPT=-MDevel::Autoflush is found by any perl #--------------------------------------------------------------------------# use Devel::Autoflush 0.04 (); # directory fixture my $Autoflush_Lib = tempdir( "CPAN-Reporter-lib-XXXX", TMPDIR => 1, CLEANUP => 1 ); # copy Devel::Autoflush to directory or clear autoflush_lib variable _file_copy_quiet( $INC{'Devel/Autoflush.pm'}, File::Spec->catfile( $Autoflush_Lib, qw/Devel Autoflush.pm/ ) ) or undef $Autoflush_Lib; #--------------------------------------------------------------------------# # public API #--------------------------------------------------------------------------# sub configure { goto &CPAN::Reporter::Config::_configure; } sub grade_make { my @args = @_; my $result = _init_result( 'make', @args ) or return; _compute_make_grade($result); if ( $result->{grade} eq 'discard' ) { $CPAN::Frontend->myprint( "\nCPAN::Reporter: test results were not valid, $result->{grade_msg}.\n\n", $result->{prereq_pm}, "\n", "Test report will not be sent" ); CPAN::Reporter::History::_record_history( $result ) if not CPAN::Reporter::History::_is_duplicate( $result ); } else { _print_grade_msg($result->{make_cmd}, $result); if ( $result->{grade} ne 'pass' ) { _dispatch_report( $result ) } } return $result->{success}; } sub grade_PL { my @args = @_; my $result = _init_result( 'PL', @args ) or return; _compute_PL_grade($result); if ( $result->{grade} eq 'discard' ) { $CPAN::Frontend->myprint( "\nCPAN::Reporter: test results were not valid, $result->{grade_msg}.\n\n", $result->{prereq_pm}, "\n", "Test report will not be sent" ); CPAN::Reporter::History::_record_history( $result ) if not CPAN::Reporter::History::_is_duplicate( $result ); } else { _print_grade_msg($result->{PL_file} , $result); if ( $result->{grade} ne 'pass' ) { _dispatch_report( $result ) } } return $result->{success}; } sub grade_test { my @args = @_; my $result = _init_result( 'test', @args ) or return; _compute_test_grade($result); if ( $result->{grade} eq 'discard' ) { $CPAN::Frontend->myprint( "\nCPAN::Reporter: test results were not valid, $result->{grade_msg}.\n\n", $result->{prereq_pm}, "\n", "Test report will not be sent" ); CPAN::Reporter::History::_record_history( $result ) if not CPAN::Reporter::History::_is_duplicate( $result ); } else { _print_grade_msg( "Test", $result ); _dispatch_report( $result ); } return $result->{success}; } sub record_command { my ($command, $timeout) = @_; # XXX refactor this! # Get configuration options if ( -r CPAN::Reporter::Config::_get_config_file() ) { my $config_obj = CPAN::Reporter::Config::_open_config_file(); my $config; $config = CPAN::Reporter::Config::_get_config_options( $config_obj ) if $config_obj; $timeout ||= $config->{command_timeout}; # might still be undef } my ($cmd, $redirect) = _split_redirect($command); # Teeing a command loses its exit value so we must wrap the command # and print the exit code so we can read it off of output my $wrap_code; if ( $timeout ) { $wrap_code = $^O eq 'MSWin32' ? _timeout_wrapper_win32($cmd, $timeout) : _timeout_wrapper($cmd, $timeout); } # if no timeout or timeout wrap code wasn't available if ( ! $wrap_code ) { my $safecmd = quotemeta($cmd); $wrap_code = << "HERE"; my \$rc = system("$safecmd"); my \$ec = \$rc == -1 ? -1 : \$?; print "($safecmd exited with \$ec)\\n"; HERE } # write code to a tempfile for execution my $wrapper_name = _temp_filename( 'CPAN-Reporter-CW-' ); my $wrapper_fh = IO::File->new( $wrapper_name, 'w' ) or die "Could not create a wrapper for $cmd\: $!"; $wrapper_fh->print( $wrap_code ); $wrapper_fh->close; # tee the command wrapper my @tee_input = ( Probe::Perl->find_perl_interpreter, $wrapper_name ); push @tee_input, $redirect if defined $redirect; my $tee_out; { # ensure autoflush if we can local $ENV{PERL5OPT} = _get_perl5opt() if _is_PL($command); $tee_out = tee_merged { system( @tee_input ) }; } # cleanup unlink $wrapper_name unless $ENV{PERL_CR_NO_CLEANUP}; my @cmd_output = split qr{(?<=$/)}, $tee_out; if ( ! @cmd_output ) { $CPAN::Frontend->mywarn( "CPAN::Reporter: didn't capture command results for '$cmd'\n" ); return; } # extract the exit value my $exit_value; if ( $cmd_output[-1] =~ m{exited with} ) { ($exit_value) = $cmd_output[-1] =~ m{exited with ([-0-9]+)}; pop @cmd_output; } # bail out on some errors if ( ! defined $exit_value ) { $CPAN::Frontend->mywarn( "CPAN::Reporter: couldn't determine exit value for '$cmd'\n" ); return; } elsif ( $exit_value == -1 ) { $CPAN::Frontend->mywarn( "CPAN::Reporter: couldn't execute '$cmd'\n" ); return; } return \@cmd_output, $exit_value; } sub test { my ($dist, $system_command) = @_; my ($output, $exit_value) = record_command( $system_command ); return grade_test( $dist, $system_command, $output, $exit_value ); } #--------------------------------------------------------------------------# # private functions #--------------------------------------------------------------------------# #--------------------------------------------------------------------------# # _compute_make_grade #--------------------------------------------------------------------------# sub _compute_make_grade { my $result = shift; my ($grade,$msg); if ( $result->{exit_value} ) { $result->{grade} = "unknown"; $result->{grade_msg} = "Stopped with an error" } else { $result->{grade} = "pass"; $result->{grade_msg} = "No errors" } _downgrade_known_causes( $result ); $result->{success} = $result->{grade} eq 'pass'; return; } #--------------------------------------------------------------------------# # _compute_PL_grade #--------------------------------------------------------------------------# sub _compute_PL_grade { my $result = shift; my ($grade,$msg); if ( $result->{exit_value} ) { $result->{grade} = "unknown"; $result->{grade_msg} = "Stopped with an error" } else { $result->{grade} = "pass"; $result->{grade_msg} = "No errors" } _downgrade_known_causes( $result ); $result->{success} = $result->{grade} eq 'pass'; return; } #--------------------------------------------------------------------------# # _compute_test_grade # # Don't shortcut to unknown unless _has_tests because a custom # Makefile.PL or Build.PL might define tests in a non-standard way # # With test.pl and 'make test', any t/*.t might pass Test::Harness, but # test.pl might still fail, or there might only be test.pl, # so use exit code directly # # Likewise, if we have recursive Makefile.PL, then we don't trust the # reverse-order parsing and should just take the exit code directly # # Otherwise, parse in reverse order for Test::Harness output or a couple # other significant strings and stop after the first match. Going in # reverse and stopping is done to (hopefully) avoid picking up spurious # results from any test output. But then we have to check for # unsupported OS strings in case those were printed but were not fatal. #--------------------------------------------------------------------------# sub _compute_test_grade { my $result = shift; my ($grade,$msg); my $output = $result->{output}; # In some cases, get a result straight from the exit code if ( $result->{is_make} && ( -f "test.pl" || _has_recursive_make() ) ) { if ( $result->{exit_value} ) { $grade = "fail"; $msg = "'make test' error detected"; } else { $grade = "pass"; $msg = "'make test' no errors"; } } # Otherwise, get a result from Test::Harness output else { # figure out the right harness parser _expand_result( $result ); my $harness_version = $result->{toolchain}{'Test::Harness'}{have}; my $harness_parser = CPAN::Version->vgt($harness_version, '2.99_01') ? \&_parse_tap_harness : \&_parse_test_harness; # parse lines in reverse for my $i ( reverse 0 .. $#{$output} ) { if ( $output->[$i] =~ m{No support for OS|OS unsupported}ims ) { # from any *.t file $grade = 'na'; $msg = 'This platform is not supported'; } elsif ( $output->[$i] =~ m{^.?No tests defined}ms ) { # from M::B $grade = 'unknown'; $msg = 'No tests provided'; } else { ($grade, $msg) = $harness_parser->( $output->[$i] ); } last if $grade; } # fallback on exit value if no recognizable Test::Harness output if ( ! $grade ) { $grade = $result->{exit_value} ? "fail" : "pass"; $msg = ( $result->{is_make} ? "'make test' " : "'Build test' " ) . ( $result->{exit_value} ? "error detected" : "no errors"); } } $result->{grade} = $grade; $result->{grade_msg} = $msg; _downgrade_known_causes( $result ); $result->{success} = $result->{grade} eq 'pass' || $result->{grade} eq 'unknown'; return; } #--------------------------------------------------------------------------# # _dispatch_report # # Set up Test::Reporter and prompt user for edit, send #--------------------------------------------------------------------------# sub _dispatch_report { my $result = shift; my $phase = $result->{phase}; $CPAN::Frontend->myprint( "CPAN::Reporter: preparing a CPAN Testers report for $result->{dist_name}\n" ); # Get configuration options my $config_obj = CPAN::Reporter::Config::_open_config_file(); my $config; $config = CPAN::Reporter::Config::_get_config_options( $config_obj ) if $config_obj; if ( ! $config->{email_from} ) { $CPAN::Frontend->mywarn( << "EMAIL_REQUIRED"); CPAN::Reporter: required 'email_from' option missing an email address, so test report will not be sent. See documentation for configuration details. Even though CPAN Testers no longer uses email, this email address will show up in the report and help identify the tester. This is required for compatibility with tools that process legacy reports for analysis. EMAIL_REQUIRED return; } # Need to know if this is a duplicate my $is_duplicate = CPAN::Reporter::History::_is_duplicate( $result ); # Abort if the distribution name is not formatted according to # CPAN Testers requirements: Dist-Name-version.suffix # Regex from CPAN-Testers should extract name, separator, version # and extension my @format_checks = $result->{dist_basename} =~ m{(.+)([\-\_])(v?\d.*)(\.(?:tar\.(?:gz|bz2)|tgz|zip))$}i; ; if ( ! grep { length } @format_checks ) { $CPAN::Frontend->mywarn( << "END_BAD_DISTNAME"); CPAN::Reporter: the distribution name '$result->{dist_basename}' does not appear to be packaged according to CPAN tester guidelines. Perhaps it is not a normal CPAN distribution. Test report will not be sent. END_BAD_DISTNAME # record this as a discard, instead $result->{grade} = 'discard'; CPAN::Reporter::History::_record_history( $result ) if not $is_duplicate; return; } # Gather 'expensive' data for the report _expand_result( $result); # Skip if distribution name matches the send_skipfile if ( $config->{send_skipfile} && -r $config->{send_skipfile} ) { my $send_skipfile = IO::File->new( $config->{send_skipfile}, "r" ); my $dist_id = $result->{dist}->pretty_id; while ( my $pattern = <$send_skipfile> ) { chomp($pattern); # ignore comments next if substr($pattern,0,1) eq '#'; # if it doesn't match, continue with next pattern next if $dist_id !~ /$pattern/i; # if it matches, warn and return $CPAN::Frontend->myprint( << "END_SKIP_DIST" ); CPAN::Reporter: '$dist_id' matched against the send_skipfile. Test report will not be sent. END_SKIP_DIST return; } } # Setup the test report my $tr = Test::Reporter->new; $tr->grade( $result->{grade} ); $tr->distribution( $result->{dist_name} ); # Older Test::Reporter doesn't support distfile, but we need it for # Metabase transport $tr->distfile( $result->{dist}->pretty_id ) if $Test::Reporter::VERSION >= 1.54; # Skip if duplicate and not sending duplicates if ( $is_duplicate ) { if ( _prompt( $config, "send_duplicates", $tr->grade) =~ /^n/ ) { $CPAN::Frontend->myprint(<< "DUPLICATE_REPORT"); CPAN::Reporter: this appears to be a duplicate report for the $phase phase: @{[$tr->subject]} Test report will not be sent. DUPLICATE_REPORT return; } } # Set debug and transport options, if supported $tr->debug( $config->{debug} ) if defined $config->{debug}; my $transport = $config->{transport}; unless ( defined $transport && length $transport ) { $CPAN::Frontend->mywarn( << "TRANSPORT_REQUIRED"); CPAN::Reporter: required 'transport' option missing so the test report will not be sent. See documentation for configuration details. TRANSPORT_REQUIRED return; } my @transport_args = split " ", $transport; # special hack for Metabase arguments if ($transport_args[0] eq 'Metabase') { @transport_args = _validate_metabase_args(@transport_args); unless (@transport_args) { $CPAN::Frontend->mywarn( "Test report will not be sent.\n\n" ); return; } } eval { $tr->transport( @transport_args ) }; if ($@) { $CPAN::Frontend->mywarn( "CPAN::Reporter: problem with Test::Reporter transport: \n" . "$@\n" . "Test report will not be sent\n" ); return; } # prepare mail transport $tr->from( $config->{email_from} ); # Populate the test report $tr->comments( _report_text( $result ) ); $tr->via( 'CPAN::Reporter ' . $CPAN::Reporter::VERSION ); # prompt for editing report if ( _prompt( $config, "edit_report", $tr->grade ) =~ /^y/ ) { my $editor = $config->{editor}; local $ENV{VISUAL} = $editor if $editor; ## no critic $tr->edit_comments; } # send_*_report can override send_report my $send_config = defined $config->{"send_$phase\_report"} ? "send_$phase\_report" : "send_report" ; if ( _prompt( $config, $send_config, $tr->grade ) =~ /^y/ ) { $CPAN::Frontend->myprint( "CPAN::Reporter: sending test report with '" . $tr->grade . "' via " . $transport_args[0] . "\n"); if ( $tr->send() ) { CPAN::Reporter::History::_record_history( $result ) if not $is_duplicate; } else { $CPAN::Frontend->mywarn( "CPAN::Reporter: " . $tr->errstr . "\n"); if ( $config->{retry_submission} ) { sleep(3); $CPAN::Frontend->mywarn( "CPAN::Reporter: second attempt\n"); $tr->errstr(''); if ( $tr->send() ) { CPAN::Reporter::History::_record_history( $result ) if not $is_duplicate; } else { $CPAN::Frontend->mywarn( "CPAN::Reporter: " . $tr->errstr . "\n"); } } } } else { $CPAN::Frontend->myprint("CPAN::Reporter: test report will not be sent\n"); } return; } sub _report_timeout { my $result = shift; if ($result->{exit_value} == 9) { my $config_obj = CPAN::Reporter::Config::_open_config_file(); my $config; $config = CPAN::Reporter::Config::_get_config_options( $config_obj ) if $config_obj; if ($config->{'_store_problems_in_dir'}) { my $distribution = $result->{dist}->base_id; my $file = "e9.$distribution.${\(time)}.$$.log"; if (open my $to_log_fh, '>>', $config->{'_store_problems_in_dir'}.'/'.$file) { print $to_log_fh $distribution,"\n"; print $to_log_fh "stage: ",$result->{phase},"\n"; print $to_log_fh $Config{archname},"\n"; print $to_log_fh _report_text( $result ); } else { $CPAN::Frontend->mywarn( "CPAN::Reporter: writing ". $config->{'_store_problems_in_dir'}.'/'.$file. " failed\n"); } } if ($config->{'_problem_log'}) { my $distribution = $result->{dist}->base_id; if (open my $to_log_fh, '>>', $config->{'_problem_log'}) { print $to_log_fh "$result->{phase} $distribution $Config{archname}\n"; } else { $CPAN::Frontend->mywarn( "CPAN::Reporter: writing ". $config->{'_store_problems_in_dir'}. " failed\n"); } } } } #--------------------------------------------------------------------------# # _downgrade_known_causes # Downgrade failure/unknown grade if we can determine a cause # If platform not supported => 'na' # If perl version is too low => 'na' # If stated prereqs missing => 'discard' #--------------------------------------------------------------------------# sub _downgrade_known_causes { my ($result) = @_; my ($grade, $output) = ( $result->{grade}, $result->{output} ); my $msg = $result->{grade_msg} || q{}; # shortcut unless fail/unknown; but PL might look like pass but actually # have "OS Unsupported" messages if someone printed message and then # did "exit 0" return if $grade eq 'na'; return if $grade eq 'pass' && $result->{phase} ne 'PL'; # get prereqs _expand_result( $result ); _report_timeout( $result ); # if process was halted with a signal, just set for discard and return if ( $result->{exit_value} & 127 ) { $result->{grade} = 'discard'; $result->{grade_msg} = 'Command interrupted'; return; } # look for perl version error messages from various programs # "Error evaling..." type errors happen on Perl < 5.006 when modules # define their version with "our $VERSION = ..." my ($harness_error, $version_error, $unsupported) ; for my $line ( @$output ) { if ( $result->{phase} eq 'test' && $line =~ m{open3: IO::Pipe: Can't spawn.*?TAP/Parser/Iterator/Process.pm} ) { $harness_error++; last; } if( $line =~ /(?{prereq_pm} =~ m{^\s+!\s+perl\s}ims ) { $grade = 'na'; $msg = 'Perl version too low'; } # check again for unsupported OS in case we took 'fail' from exit value elsif ( $unsupported ) { $grade = 'na'; $msg = 'This platform is not supported'; } # check for Makefile without 'test' target; there are lots # of variations on the error message, e.g. "target test", "target 'test'", # "'test'", "`test'" and so on. elsif ( $result->{is_make} && $result->{phase} eq 'test' && ! _has_test_target() ) { $grade = 'unknown'; $msg = 'No make test target'; } # check the prereq report for missing or failure flag '!' elsif ( $grade ne 'pass' && $result->{prereq_pm} =~ m{n/a}ims ) { $grade = 'discard'; $msg = "Prerequisite missing:\n$result->{prereq_pm}"; } elsif ( $grade ne 'pass' && $result->{prereq_pm} =~ m{^\s+!}ims ) { $grade = 'discard'; $msg = "Prerequisite version too low:\n$result->{prereq_pm}"; } # in PL stage -- if pass but no Makefile or Build, then this should # be recorded as a discard elsif ( $result->{phase} eq 'PL' && $grade eq 'pass' && ! -f 'Makefile' && ! -f 'Build' ) { $grade = 'discard'; $msg = 'No Makefile or Build file found'; } elsif ( $result->{command} =~ /Build.*?-j/ ) { $grade = 'discard'; $msg = '-j is not a valid option for Module::Build (upgrade your CPAN.pm)'; } elsif ( $result->{is_make} && $result->{phase} eq 'make' && grep { /Makefile out-of-date with respect to Makefile.PL/ } @$output ) { $grade = 'discard'; $msg = 'Makefile out-of-date'; } # store results $result->{grade} = $grade; $result->{grade_msg} = $msg; return; } #--------------------------------------------------------------------------# # _expand_result - add expensive information like prerequisites and # toolchain that should only be generated if a report will actually # be sent #--------------------------------------------------------------------------# sub _expand_result { my $result = shift; return if $result->{expanded}++; # only do this once $result->{prereq_pm} = _prereq_report( $result->{dist} ); { # mirror PERL5OPT as in record_command local $ENV{PERL5OPT} = _get_perl5opt() if _is_PL($result->{command}); $result->{env_vars} = _env_report(); } $result->{special_vars} = _special_vars_report(); $result->{toolchain_versions} = _toolchain_report( $result ); $result->{perl_version} = CPAN::Reporter::History::_format_perl_version(); return; } #--------------------------------------------------------------------------# # _env_report #--------------------------------------------------------------------------# # Entries bracketed with "/" are taken to be a regex; otherwise literal my @env_vars= qw( /HARNESS/ /LC_/ /PERL/ /_TEST/ CCFLAGS COMSPEC INCLUDE INSTALL_BASE LANG LANGUAGE LD_LIBRARY_PATH LDFLAGS LIB NON_INTERACTIVE NUMBER_OF_PROCESSORS PATH PREFIX PROCESSOR_IDENTIFIER SHELL TERM TEMP TMPDIR ); sub _env_report { my @vars_found; for my $var ( @env_vars ) { if ( $var =~ m{^/(.+)/$} ) { push @vars_found, grep { /$1/ } keys %ENV; } else { push @vars_found, $var if exists $ENV{$var}; } } my $report = ""; for my $var ( sort @vars_found ) { my $value = $ENV{$var}; $value = '[undef]' if ! defined $value; $report .= " $var = $value\n"; } return $report; } #--------------------------------------------------------------------------# # _file_copy_quiet # # manual file copy -- quietly return undef on failure #--------------------------------------------------------------------------# sub _file_copy_quiet { my ($source, $target) = @_; # ensure we have a target directory mkpath( dirname($target) ) or return; # read source local *FH; open FH, "<$source" or return; ## no critic my $pm_guts = do { local $/; }; close FH; # write target open FH, ">$target" or return; ## no critic print FH $pm_guts; close FH; return 1; } #--------------------------------------------------------------------------# # _get_perl5opt #--------------------------------------------------------------------------# sub _get_perl5opt { my $perl5opt = $ENV{PERL5OPT} || q{}; if ( $Autoflush_Lib ) { $perl5opt .= q{ } if length $perl5opt; $perl5opt .= "-I$Autoflush_Lib " if $] >= 5.008; $perl5opt .= "-MDevel::Autoflush"; } return $perl5opt; } #--------------------------------------------------------------------------# # _has_recursive_make # # Ignore Makefile.PL in t directories #--------------------------------------------------------------------------# sub _has_recursive_make { my $PL_count = 0; File::Find::find( sub { if ( $_ eq 't' ) { $File::Find::prune = 1; } elsif ( $_ eq 'Makefile.PL' ) { $PL_count++; } }, File::Spec->curdir() ); return $PL_count > 1; } #--------------------------------------------------------------------------# # _has_test_target #--------------------------------------------------------------------------# sub _has_test_target { my $fh = IO::File->new("Makefile") or return; return scalar grep { /^test[ ]*:/ } <$fh>; } #--------------------------------------------------------------------------# # _init_result -- create and return a hash of values for use in # report evaluation and dispatch # # takes same argument format as grade_*() #--------------------------------------------------------------------------# sub _init_result { my ($phase, $dist, $system_command, $output, $exit_value) = @_; unless ( defined $output && defined $exit_value ) { my $missing; if ( ! defined $output && ! defined $exit_value ) { $missing = "exit value and output" } elsif ( defined $output && !defined $exit_value ) { $missing = "exit value" } else { $missing = "output"; } $CPAN::Frontend->mywarn( "CPAN::Reporter: had errors capturing $missing. Tests abandoned" ); return; } if ( $dist->pretty_id =~ m{\w+/Perl6/} ) { $CPAN::Frontend->mywarn( "CPAN::Reporter: Won't report a Perl6 distribution." ); return; } my $result = { phase => $phase, dist => $dist, command => $system_command, is_make => _is_make( $system_command ), output => ref $output eq 'ARRAY' ? $output : [ split /\n/, $output ], exit_value => $exit_value, # Note: pretty_id is like "DAGOLDEN/CPAN-Reporter-0.40.tar.gz" dist_basename => basename($dist->pretty_id), dist_name => $dist->base_id, }; # Used in messages to user $result->{PL_file} = $result->{is_make} ? "Makefile.PL" : "Build.PL"; $result->{make_cmd} = $result->{is_make} ? $Config{make} : "Build"; # CPAN might fail to find an author object for some strange dists my $author = $dist->author; $result->{author} = defined $author ? $author->fullname : "Author"; $result->{author_id} = defined $author ? $author->id : "" ; return $result; } #--------------------------------------------------------------------------# # _is_make #--------------------------------------------------------------------------# sub _is_make { my $command = shift; return $command =~ m{\b(?:\S*make|Makefile.PL)\b}ims ? 1 : 0; } #--------------------------------------------------------------------------# # _is_PL #--------------------------------------------------------------------------# sub _is_PL { my $command = shift; return $command =~ m{\b(?:Makefile|Build)\.PL\b}ims ? 1 : 0; } #--------------------------------------------------------------------------# # _max_length #--------------------------------------------------------------------------# sub _max_length { my ($first, @rest) = @_; my $max = length $first; for my $term ( @rest ) { $max = length $term if length $term > $max; } return $max; } #--------------------------------------------------------------------------# # _parse_tap_harness # # As of Test::Harness 2.99_02, the final line is provided by TAP::Harness # as "Result: STATUS" where STATUS is "PASS", "FAIL" or "NOTESTS" #--------------------------------------------------------------------------# sub _parse_tap_harness { my ($line) = @_; if ( $line =~ m{^Result:\s+([A-Z]+)} ) { if ( $1 eq 'PASS' ) { return ('pass', 'All tests successful'); } elsif ( $1 eq 'FAIL' ) { return ('fail', 'One or more tests failed'); } elsif ( $1 eq 'NOTESTS' ) { return ('unknown', 'No tests were run'); } } elsif ( $line =~ m{Bailout called\.\s+Further testing stopped}ms ) { return ( 'fail', 'Bailed out of tests'); } return; } #--------------------------------------------------------------------------# # _parse_test_harness # # Output strings taken from Test::Harness:: # _show_results() -- for versions < 2.57_03 # get_results() -- for versions >= 2.57_03 #--------------------------------------------------------------------------# sub _parse_test_harness { my ($line) = @_; if ( $line =~ m{^All tests successful}ms ) { return ( 'pass', 'All tests successful' ); } elsif ( $line =~ m{^FAILED--no tests were run}ms ) { return ( 'unknown', 'No tests were run' ); } elsif ( $line =~ m{^FAILED--.*--no output}ms ) { return ( 'unknown', 'No tests were run'); } elsif ( $line =~ m{FAILED--Further testing stopped}ms ) { return ( 'fail', 'Bailed out of tests'); } elsif ( $line =~ m{^Failed }ms ) { # must be lowercase return ( 'fail', 'One or more tests failed'); } else { return; } } #--------------------------------------------------------------------------# # _prereq_report #--------------------------------------------------------------------------# my @prereq_sections = qw( requires build_requires configure_requires opt_requires opt_build_requires ); sub _prereq_report { my $dist = shift; my (%need, %have, %prereq_met, $report); # Extract requires/build_requires from CPAN dist my $prereq_pm = $dist->prereq_pm; if ( ref $prereq_pm eq 'HASH' ) { # CPAN 1.94 returns hash with requires/build_requires # so no need to support old style foreach (values %$prereq_pm) { if (defined && ref ne 'HASH') { require Data::Dumper; warn "Data error detecting prerequisites. Please report it to CPAN::Reporter bug tracker:"; warn Data::Dumper::Dumper($prereq_pm); die "Stopping"; } } for my $sec ( @prereq_sections ) { $need{$sec} = $prereq_pm->{$sec} if keys %{ $prereq_pm->{$sec} }; } } # Extract configure_requires from META.yml if it exists if ( $dist->{build_dir} && -d $dist->{build_dir} ) { my $meta_yml = File::Spec->catfile($dist->{build_dir}, 'META.yml'); if ( -f $meta_yml ) { my @yaml = eval { Parse::CPAN::Meta::LoadFile($meta_yml) }; if ( $@ ) { $CPAN::Frontend->mywarn( "CPAN::Reporter: error parsing META.yml\n" ); } if ( ref $yaml[0] eq 'HASH' && ref $yaml[0]{configure_requires} eq 'HASH' ) { $need{configure_requires} = $yaml[0]{configure_requires}; } } } # see what prereqs are satisfied in subprocess for my $section ( @prereq_sections ) { next unless ref $need{$section} eq 'HASH'; my @prereq_list = %{ $need{$section} }; next unless @prereq_list; my $prereq_results = _version_finder( @prereq_list ); for my $mod ( keys %{$prereq_results} ) { $have{$section}{$mod} = $prereq_results->{$mod}{have}; $prereq_met{$section}{$mod} = $prereq_results->{$mod}{met}; } } # find formatting widths my ($name_width, $need_width, $have_width) = (6, 4, 4); for my $section ( @prereq_sections ) { for my $module ( keys %{ $need{$section} } ) { my $name_length = length $module; my $need_length = length $need{$section}{$module}; my $have_length = length $have{$section}{$module}; $name_width = $name_length if $name_length > $name_width; $need_width = $need_length if $need_length > $need_width; $have_width = $have_length if $have_length > $have_width; } } my $format_str = " \%1s \%-${name_width}s \%-${need_width}s \%-${have_width}s\n"; # generate the report for my $section ( @prereq_sections ) { if ( keys %{ $need{$section} } ) { $report .= "$section:\n\n"; $report .= sprintf( $format_str, " ", qw/Module Need Have/ ); $report .= sprintf( $format_str, " ", "-" x $name_width, "-" x $need_width, "-" x $have_width ); for my $module (sort {lc $a cmp lc $b} keys %{ $need{$section} } ) { my $need = $need{$section}{$module}; my $have = $have{$section}{$module}; my $bad = $prereq_met{$section}{$module} ? " " : "!"; $report .= sprintf( $format_str, $bad, $module, $need, $have); } $report .= "\n"; } } return $report || " No requirements found\n"; } #--------------------------------------------------------------------------# # _print_grade_msg - #--------------------------------------------------------------------------# sub _print_grade_msg { my ($phase, $result) = @_; my ($grade, $msg) = ($result->{grade}, $result->{grade_msg}); $CPAN::Frontend->myprint( "CPAN::Reporter: $phase result is '$grade'"); $CPAN::Frontend->myprint(", $msg") if defined $msg && length $msg; $CPAN::Frontend->myprint(".\n"); return; } #--------------------------------------------------------------------------# # _prompt # # Note: always returns lowercase #--------------------------------------------------------------------------# sub _prompt { my ($config, $option, $grade, $extra) = @_; $extra ||= q{}; my %spec = CPAN::Reporter::Config::_config_spec(); my $dispatch = CPAN::Reporter::Config::_validate_grade_action_pair( $option, join(q{ }, "default:no", $config->{$option} || '') ); my $action = $dispatch->{$grade} || $dispatch->{default}; my $intro = $spec{$option}{prompt} . $extra . " (yes/no)"; my $prompt; if ( $action =~ m{^ask/yes}i ) { $prompt = CPAN::Shell::colorable_makemaker_prompt( $intro, "yes" ); } elsif ( $action =~ m{^ask(/no)?}i ) { $prompt = CPAN::Shell::colorable_makemaker_prompt( $intro, "no" ); } else { $prompt = $action; } return lc $prompt; } #--------------------------------------------------------------------------# # _report_text #--------------------------------------------------------------------------# my %intro_para = ( 'pass' => <<'HERE', Thank you for uploading your work to CPAN. Congratulations! All tests were successful. HERE 'fail' => <<'HERE', Thank you for uploading your work to CPAN. However, there was a problem testing your distribution. If you think this report is invalid, please consult the CPAN Testers Wiki for suggestions on how to avoid getting FAIL reports for missing library or binary dependencies, unsupported operating systems, and so on: http://wiki.cpantesters.org/wiki/CPANAuthorNotes HERE 'unknown' => <<'HERE', Thank you for uploading your work to CPAN. However, attempting to test your distribution gave an inconclusive result. This could be because your distribution had an error during the make/build stage, did not define tests, tests could not be found, because your tests were interrupted before they finished, or because the results of the tests could not be parsed. You may wish to consult the CPAN Testers Wiki: http://wiki.cpantesters.org/wiki/CPANAuthorNotes HERE 'na' => <<'HERE', Thank you for uploading your work to CPAN. While attempting to build or test this distribution, the distribution signaled that support is not available either for this operating system or this version of Perl. Nevertheless, any diagnostic output produced is provided below for reference. If this is not what you expect, you may wish to consult the CPAN Testers Wiki: http://wiki.cpantesters.org/wiki/CPANAuthorNotes HERE ); sub _comment_text { # We assemble the completed comment as a series of "parts" which # will get joined together my @comment_parts; # All automated testing gets a preamble if ($ENV{AUTOMATED_TESTING}) { push @comment_parts, "this report is from an automated smoke testing program\n" . "and was not reviewed by a human for accuracy" } # If a comment file is provided, read it and add it to the comment my $confdir = CPAN::Reporter::Config::_get_config_dir(); my $comment_file = File::Spec->catfile($confdir, 'comment.txt'); if ( -d $confdir && -f $comment_file && -r $comment_file ) { open my $fh, '<:encoding(UTF-8)', $comment_file or die($!); my $text; do { local $/ = undef; # No record (line) seperator on input defined( $text = <$fh> ) or die($!); }; chomp($text); push @comment_parts, $text; close $fh; } # If we have an empty comment so far, add a default value if (scalar(@comment_parts) == 0) { push @comment_parts, 'none provided'; } # Join the parts seperated by a blank line return join "\n\n", @comment_parts; } sub _report_text { my $data = shift; my $test_log = join(q{},@{$data->{output}}); if ( length $test_log > MAX_OUTPUT_LENGTH ) { my $max_k = int(MAX_OUTPUT_LENGTH/1000) . "K"; $test_log = substr( $test_log, 0, MAX_OUTPUT_LENGTH/2 ) . "\n\n" . "[Output truncated because it exceeded $max_k]\n\n" . substr( $test_log, -(MAX_OUTPUT_LENGTH/2) ); } my $comment_body = _comment_text(); # generate report my $output = << "ENDREPORT"; Dear $data->{author}, This is a computer-generated report for $data->{dist_name} on perl $data->{perl_version}, created by CPAN-Reporter-$CPAN::Reporter::VERSION\. $intro_para{ $data->{grade} } Sections of this report: * Tester comments * Program output * Prerequisites * Environment and other context ------------------------------ TESTER COMMENTS ------------------------------ Additional comments from tester: $comment_body ------------------------------ PROGRAM OUTPUT ------------------------------ Output from '$data->{command}': $test_log ------------------------------ PREREQUISITES ------------------------------ Prerequisite modules loaded: $data->{prereq_pm} ------------------------------ ENVIRONMENT AND OTHER CONTEXT ------------------------------ Environment variables: $data->{env_vars} Perl special variables (and OS-specific diagnostics, for MSWin32): $data->{special_vars} Perl module toolchain versions installed: $data->{toolchain_versions} ENDREPORT return $output; } #--------------------------------------------------------------------------# # _special_vars_report #--------------------------------------------------------------------------# sub _special_vars_report { my $special_vars = << "HERE"; \$^X = $^X \$UID/\$EUID = $< / $> \$GID = $( \$EGID = $) HERE if ( $^O eq 'MSWin32' && eval "require Win32" ) { ## no critic my @getosversion = Win32::GetOSVersion(); my $getosversion = join(", ", @getosversion); $special_vars .= " Win32::GetOSName = " . Win32::GetOSName() . "\n"; $special_vars .= " Win32::GetOSVersion = $getosversion\n"; $special_vars .= " Win32::FsType = " . Win32::FsType() . "\n"; $special_vars .= " Win32::IsAdminUser = " . Win32::IsAdminUser() . "\n"; } return $special_vars; } #--------------------------------------------------------------------------# # _split_redirect #--------------------------------------------------------------------------# sub _split_redirect { my $command = shift; my ($cmd, $prefix) = ($command =~ m{\A(.+?)(\|.*)\z}); if (defined $cmd) { return ($cmd, $prefix); } else { # didn't match a redirection return $command } } #--------------------------------------------------------------------------# # _temp_filename -- stand-in for File::Temp for backwards compatibility # # takes an optional prefix, adds 8 random chars and returns # an absolute pathname # # NOTE -- manual unlink required #--------------------------------------------------------------------------# # @CHARS from File::Temp my @CHARS = (qw/ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z a b c d e f g h i j k l m n o p q r s t u v w x y z 0 1 2 3 4 5 6 7 8 9 _ /); sub _temp_filename { my ($prefix) = @_; $prefix = q{} unless defined $prefix; $prefix .= $CHARS[ int( rand(@CHARS) ) ] for 0 .. 7; return File::Spec->catfile(File::Spec->tmpdir(), $prefix); } #--------------------------------------------------------------------------# # _timeout_wrapper # Timeout technique adapted from App::cpanminus (thank you Miyagawa!) #--------------------------------------------------------------------------# sub _timeout_wrapper { my ($cmd, $timeout) = @_; # protect shell quotes $cmd = quotemeta($cmd); my $wrapper = sprintf << 'HERE', $timeout, $cmd, $cmd; use strict; my ($pid, $exitcode); eval { $pid = fork; if ($pid) { local $SIG{CHLD}; local $SIG{ALRM} = sub {die 'Timeout'}; alarm %s; my $wstat = waitpid $pid, 0; alarm 0; $exitcode = $wstat == -1 ? -1 : $?; } elsif ( $pid == 0 ) { setpgrp(0,0); # new process group exec "%s"; } else { die "Cannot fork: $!\n" unless defined $pid; } }; if ($pid && $@ =~ /Timeout/){ kill -9 => $pid; # and send to our child's whole process group waitpid $pid, 0; $exitcode = 9; # force result to look like SIGKILL } elsif ($@) { die $@; } print "(%s exited with $exitcode)\n"; HERE return $wrapper; } #--------------------------------------------------------------------------# # _timeout_wrapper_win32 #--------------------------------------------------------------------------# sub _timeout_wrapper_win32 { my ($cmd, $timeout) = @_; $timeout ||= 0; # just in case upstream doesn't guarantee it eval "use Win32::Job ();"; if ($@) { $CPAN::Frontend->mywarn( << 'HERE' ); CPAN::Reporter: you need Win32::Job for inactivity_timeout support. Continuing without timeout... HERE return; } my ($program) = split " ", $cmd; if (! File::Spec->file_name_is_absolute( $program ) ) { my $exe = $program . ".exe"; my ($path) = grep { -e File::Spec->catfile($_,$exe) } split /$Config{path_sep}/, $ENV{PATH}; if (! $path) { $CPAN::Frontend->mywarn( << "HERE" ); CPAN::Reporter: can't locate $exe in the PATH. Continuing without timeout... HERE return; } $program = File::Spec->catfile($path,$exe); } # protect shell quotes and other things $_ = quotemeta($_) for ($program, $cmd); my $wrapper = sprintf << 'HERE', $program, $cmd, $timeout; use strict; use Win32::Job; my $executable = "%s"; my $cmd_line = "%s"; my $timeout = %s; my $job = Win32::Job->new() or die $^E; my $ppid = $job->spawn($executable, $cmd_line); $job->run($timeout); my $status = $job->status; my $exitcode = $status->{$ppid}{exitcode}; if ( $exitcode == 293 ) { $exitcode = 9; # map Win32::Job kill (293) to SIGKILL (9) } elsif ( $exitcode & 255 ) { $exitcode = $exitcode << 8; # how perl expects it } print "($cmd_line exited with $exitcode)\n"; HERE return $wrapper; } #--------------------------------------------------------------------------#- # _toolchain_report #--------------------------------------------------------------------------# my @toolchain_mods= qw( CPAN CPAN::Meta Cwd ExtUtils::CBuilder ExtUtils::Command ExtUtils::Install ExtUtils::MakeMaker ExtUtils::Manifest ExtUtils::ParseXS File::Spec JSON JSON::PP Module::Build Module::Signature Parse::CPAN::Meta Test::Harness Test::More Test2 YAML YAML::Syck version ); sub _toolchain_report { my ($result) = @_; my $installed = _version_finder( map { $_ => 0 } @toolchain_mods ); $result->{toolchain} = $installed; my $mod_width = _max_length( keys %$installed ); my $ver_width = _max_length( map { $installed->{$_}{have} } keys %$installed ); my $format = " \%-${mod_width}s \%-${ver_width}s\n"; my $report = ""; $report .= sprintf( $format, "Module", "Have" ); $report .= sprintf( $format, "-" x $mod_width, "-" x $ver_width ); for my $var ( sort keys %$installed ) { $report .= sprintf(" \%-${mod_width}s \%-${ver_width}s\n", $var, $installed->{$var}{have} ); } return $report; } #--------------------------------------------------------------------------# # _validate_metabase_args # # This is a kludge to make metabase transport args a little less # clunky for novice users #--------------------------------------------------------------------------# sub _validate_metabase_args { my @transport_args = @_; shift @transport_args; # drop leading 'Metabase' my (%args, $error); if ( @transport_args % 2 != 0 ) { $error = << "TRANSPORT_ARGS"; CPAN::Reporter: Metabase 'transport' option had odd number of parameters in the config file. See documentation for proper configuration format. TRANSPORT_ARGS } else { %args = @transport_args; for my $key ( qw/uri id_file/ ) { if ( ! $args{$key} ) { $error = << "TRANSPORT_ARGS"; CPAN::Reporter: Metabase 'transport' option did not have a '$key' parameter in the config file. See documentation for proper configuration format. TRANSPORT_ARGS } } } if ( $error ) { $CPAN::Frontend->mywarn( $error ); return; } $args{id_file} = CPAN::Reporter::Config::_normalize_id_file( $args{id_file} ); if ( ! -r $args{id_file} ) { $CPAN::Frontend->mywarn( <<"TRANSPORT_ARGS" ); CPAN::Reporter: Could not find Metabase transport 'id_file' parameter located at '$args{id_file}'. See documentation for proper configuration of the 'transport' setting. TRANSPORT_ARGS return; } return ('Metabase', %args); } #--------------------------------------------------------------------------# # _version_finder # # module => version pairs # # This is done via an external program to show installed versions exactly # the way they would be found when test programs are run. This means that # any updates to PERL5LIB will be reflected in the results. # # File-finding logic taken from CPAN::Module::inst_file(). Logic to # handle newer Module::Build prereq syntax is taken from # CPAN::Distribution::unsat_prereq() # #--------------------------------------------------------------------------# my $version_finder = $INC{'CPAN/Reporter/PrereqCheck.pm'}; sub _version_finder { my %prereqs = @_; my $perl = Probe::Perl->find_perl_interpreter(); my @prereq_results; my $prereq_input = _temp_filename( 'CPAN-Reporter-PI-' ); my $fh = IO::File->new( $prereq_input, "w" ) or die "Could not create temporary '$prereq_input' for prereq analysis: $!"; $fh->print( map { "$_ $prereqs{$_}\n" } keys %prereqs ); $fh->close; my $prereq_result = capture { system( $perl, $version_finder, '<', $prereq_input ) }; unlink $prereq_input; my %result; for my $line ( split "\n", $prereq_result ) { next unless length $line; my ($mod, $met, $have) = split " ", $line; unless ( defined($mod) && defined($met) && defined($have) ) { $CPAN::Frontend->mywarn( "Error parsing output from CPAN::Reporter::PrereqCheck:\n" . $line ); next; } $result{$mod}{have} = $have; $result{$mod}{met} = $met; } return \%result; } 1; # ABSTRACT: Adds CPAN Testers reporting to CPAN.pm =pod =encoding UTF-8 =head1 NAME CPAN::Reporter - Adds CPAN Testers reporting to CPAN.pm =head1 VERSION version 1.2019 =head1 SYNOPSIS From the CPAN shell: cpan> install Task::CPAN::Reporter cpan> reload cpan cpan> o conf init test_report Installing L will pull in additional dependencies that new CPAN Testers will need. Advanced CPAN Testers with custom L setups may wish to install only CPAN::Reporter, which has fewer dependencies. =head1 DESCRIPTION The CPAN Testers project captures and analyzes detailed results from building and testing CPAN distributions on multiple operating systems and multiple versions of Perl. This provides valuable feedback to module authors and potential users to identify bugs or platform compatibility issues and improves the overall quality and value of CPAN. One way individuals can contribute is to send a report for each module that they test or install. CPAN::Reporter is an add-on for the CPAN.pm module to send the results of building and testing modules to the CPAN Testers project. Full support for CPAN::Reporter is available in CPAN.pm as of version 1.92. =for Pod::Coverage configure grade_PL grade_make grade_test record_command test =head1 GETTING STARTED =head2 Installation The first step in using CPAN::Reporter is to install it using whatever version of CPAN.pm is already installed. CPAN.pm will be upgraded as a dependency if necessary. cpan> install CPAN::Reporter If CPAN.pm was upgraded, it needs to be reloaded. cpan> reload cpan =head2 Configuration If upgrading from a very old version of CPAN.pm, users may be prompted to renew their configuration settings, including the 'test_report' option to enable CPAN::Reporter. If not prompted automatically, users should manually initialize CPAN::Reporter support. After enabling CPAN::Reporter, CPAN.pm will automatically continue with interactive configuration of CPAN::Reporter options. cpan> o conf init test_report Users will need to enter an email address in one of the following formats: johndoe@example.com John Doe "John Q. Public" Users that are new to CPAN::Reporter should accept the recommended values for other configuration options. Users will be prompted to create a I file that uniquely identifies their test reports. See L below for details. After completing interactive configuration, be sure to commit (save) the CPAN configuration changes. cpan> o conf commit See L for advanced configuration settings. =head3 The Metabase CPAN::Reporter sends test reports to a server known as the Metabase. This requires an active Internet connection and a profile file. To create the profile, users will need to run C<<< metabase-profile >>> from a terminal window and fill the information at the prompts. This will create a file called C<<< metabase_id.json >>> in the current directory. That file should be moved to the C<<< .cpanreporter >>> directory inside the user's home directory. Users with an existing metabase profile file (e.g. from another machine), should copy it into the C<<< .cpanreporter >>> directory instead of creating a new one. Profile files may be located outside the C<<< .cpanreporter >>> directory by following instructions in L. =head3 Default Test Comments This module puts default text into the "TESTER COMMENTS" section, typically, "none provided" if doing interactive testing, or, if doing smoke testing that sets CE$ENV{AUTOMATED_TESTING}E to a true value, "this report is from an automated smoke testing program and was not reviewed by a human for accuracy." If CECPAN::ReporterE is configured to allow editing of the report, this can be edited during submission. If you wish to override the default comment, you can create a file named CEcomment.txtE in the configuration directory (typically C<<< .cpanreporter >>> under the user's home directory), with the default comment you would like to appear. Note that if your test is an automated smoke test (CE$ENV{AUTOMATED_TESTING}E is set to a true value), the smoke test notice ("this report is from an automated smoke testing program and was not reviewed by a human for accuracy") is included along with a blank line before your CEcomment.txtE, so that it is always possible to distinguish automated tests from non-automated tests that use this module. =head2 Using CPAN::Reporter Once CPAN::Reporter is enabled and configured, test or install modules with CPAN.pm as usual. For example, to test the File::Marker module: cpan> test File::Marker If a distribution's tests fail, users will be prompted to edit the report to add additional information that might help the author understand the failure. =head1 UNDERSTANDING TEST GRADES CPAN::Reporter will assign one of the following grades to the report: =over =item * C<<< pass >>> -- distribution built and tested correctly =item * C<<< fail >>> -- distribution failed to test correctly =item * C<<< unknown >>> -- distribution failed to build, had no test suite or outcome was inconclusive =item * C<<< na >>> --- distribution is not applicable to this platform andEor version of Perl =back In returning results of the test suite to CPAN.pm, "pass" and "unknown" are considered successful attempts to "make test" or "Build test" and will not prevent installation. "fail" and "na" are considered to be failures and CPAN.pm will not install unless forced. An error from Makefile.PLEBuild.PL or makeEBuild will also be graded as "unknown" and a failure will be signaled to CPAN.pm. If prerequisites specified in C<<< Makefile.PL >>> or C<<< Build.PL >>> are not available, no report will be generated and a failure will be signaled to CPAN.pm. =head1 PRIVACY WARNING CPAN::Reporter includes information in the test report about environment variables and special Perl variables that could be affecting test results in order to help module authors interpret the results of the tests. This includes information about paths, terminal, locale, userEgroup ID, installed toolchain modules (e.g. ExtUtils::MakeMaker) and so on. These have been intentionally limited to items that should not cause harmful personal information to be revealed -- it does I include your entire environment. Nevertheless, please do not use CPAN::Reporter if you are concerned about the disclosure of this information as part of your test report. Users wishing to review this information may choose to edit the report prior to sending it. =head1 BUGS Using command_timeout on Linux may cause problems. See L Please report any bugs or feature using the CPAN Request Tracker. Bugs can be submitted through the web interface at L When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. =head1 SEE ALSO Information about CPAN::Testers: =over =item * L -- overview of CPAN Testers architecture stack =item * L -- project home with all reports =item * L -- documentation and wiki =back Additional Documentation: =over =item * L -- advanced configuration settings =item * L -- hints and tips =back =for :stopwords cpan testmatrix url bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan =head1 SUPPORT =head2 Bugs / Feature Requests Please report any bugs or feature requests through the issue tracker at L. You will be notified automatically of any progress on your issue. =head2 Source Code This is open source software. The code repository is available for public review and contribution under the terms of the license. L git clone https://github.com/cpan-testers/CPAN-Reporter.git =head1 AUTHOR David Golden =head1 CONTRIBUTORS =for stopwords Alexandr Ciornii Breno G. de Oliveira Christian Walde David Cantrell Ed J Graham Knop James E Keenan J. Maslak José Joaquín Atria Kent Fredric Matthew Musgrove Patrice Clement Reini Urban Scott Wiersdorf Slaven Rezic =over 4 =item * Alexandr Ciornii =item * Breno G. de Oliveira =item * Christian Walde =item * David Cantrell =item * Ed J =item * Graham Knop =item * James E Keenan =item * J. Maslak =item * José Joaquín Atria =item * Kent Fredric =item * Matthew Musgrove =item * Patrice Clement =item * Reini Urban =item * Scott Wiersdorf =item * Slaven Rezic =back =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2023 by David Golden. This is free software, licensed under: The Apache License, Version 2.0, January 2004 =cut __END__ # vim: ts=4 sts=4 sw=4 et: 01_CPAN_Reporter.t100644000765000024 176214423611161 16772 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t# CPAN::Reporter tests use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } use IO::Handle; STDERR->autoflush(1); STDOUT->autoflush(1); use Test::More; use lib 't/lib'; use Helper; use Frontend; #--------------------------------------------------------------------------# # Bailout if we're on a broken dev version of Test::Harness #--------------------------------------------------------------------------# require Test::Harness; if ( $Test::Harness::VERSION eq "2.99_01" ) { warn "Detected Test::Harness 2.99_01\n"; BAIL_OUT("Your Test::Harness conflicts with CPAN::Reporter") } #--------------------------------------------------------------------------# my @api = qw( configure grade_PL grade_make grade_test record_command test ); my @modules = qw( CPAN::Reporter CPAN::Reporter::Config CPAN::Reporter::History ); plan tests => @api + @modules; require_ok( $_ ) for @modules; can_ok( 'CPAN::Reporter', $_ ) for @api; 20_report_output.t100644000765000024 437314423611161 17324 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use MockCPANDist; use Helper; use Frontend; use Config; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my $mock_dist = MockCPANDist->new( pretty_id => "JOHNQP/Bogus-Module-1.23.tar.gz", prereq_pm => {}, author_id => "JOHNQP", author_fullname => "John Q. Public", ); my ($got, $prereq_pm); my %standard_case_info = ( phase => "test", command => "$Config{make} test", ); my @cases = ( { expected_grade => "pass", name => "t-Pass", automated => 0, comment_txt => 0, }, { expected_grade => "fail", name => "t-Fail", automated => 0, comment_txt => 0, }, { expected_grade => "unknown", name => "NoTestFiles", automated => 0, comment_txt => 0, }, { expected_grade => "na", name => "t-NoSupport", automated => 0, comment_txt => 0, }, { expected_grade => "fail", name => "t-Fail-LongOutput", automated => 0, comment_txt => 0, }, { expected_grade => "pass", name => "t-Pass", automated => 1, comment_txt => 0, }, { expected_grade => "pass", name => "t-Pass", automated => 0, comment_txt => 1, }, { expected_grade => "pass", name => "t-Pass", automated => 1, comment_txt => 1, }, ); plan tests => 1 + test_fake_config_plan() + test_report_plan() * @cases; #--------------------------------------------------------------------------# # tests #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); test_fake_config( send_report => "yes" ); for my $case ( @cases ) { local $ENV{AUTOMATED_TESTING} = $case->{automated} || 0; $case->{label} = $case->{name}; $case->{dist} = $mock_dist; $case->{$_} = $standard_case_info{$_} for keys %standard_case_info; test_report( $case ); } NotMakefile.PL100644000765000024 6514423611161 17040 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/binuse strict; print( ($| ? "1" : "0"), "\n" ); exit; history000755000765000024 014423611161 15235 5ustar00garustaff000000000000CPAN-Reporter-1.2019/thistory.db100644000765000024 42414423611161 17365 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/historyPASS File-Marker-0.12 i686-linux-64int-ld 2.6.17-10-generic 5.008008 FAIL DateTime-0.38 i686-linux-64int-ld 2.6.17-10-generic 5.008 NA DateTime-0.38 i686-linux-64int-ld 2.6.17-10-generic 5.00504 PASS File-Marker-0.12 i686-linux-64int-ld 2.6.20-16-generic 5.009005 patch 31706 MockHomeDir.pm100644000765000024 143014423611161 17137 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/libpackage MockHomeDir; use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } use File::Spec; use File::Temp qw/tempdir/; $INC{"File/HomeDir.pm"} = 1; # fake load # tester might have these set -- we need them unset so we use our # own temporary dir & config during our tests delete $ENV{PERL_CPAN_REPORTER_DIR}; delete $ENV{PERL_CPAN_REPORTER_CONFIG}; my $temp_home = tempdir( "CPAN-Reporter-testhome-XXXXXXXX", TMPDIR => 1, CLEANUP => 1 ) or die "Couldn't create a temporary config directory: $!\nIs your temp drive full?"; my $home_dir = File::Spec->rel2abs( $temp_home ); sub home_dir { $home_dir } package File::HomeDir; our $VERSION = 999; sub my_documents { return $home_dir }; sub my_home { return $home_dir }; sub my_data { return $home_dir }; 1; distmeta.t100644000765000024 22314423611161 17342 0ustar00garustaff000000000000CPAN-Reporter-1.2019/xt/author#!perl # This file was automatically generated by Dist::Zilla::Plugin::MetaTests. use strict; use warnings; use Test::CPAN::Meta; meta_yaml_ok(); 04_option_parsing.t100644000765000024 661114423611161 17423 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use Frontend; use Helper; use Capture::Tiny qw/capture/; my @good_cases = ( { label => "empty input", option => "edit_report", input => "", output => { default => "no", } }, { label => "action (by itself)", option => "edit_report", input => "yes", output => { default => "yes", }, }, { label => "grade (by itself)", option => "edit_report", input => "fail", output => { "fail" => "yes", }, }, { label => "default:action", option => "edit_report", input => "default:no", output => { default => "no", }, }, { label => "grade:action", option => "edit_report", input => "fail:yes", output => { "fail" => "yes", }, }, { label => "grade:action action", option => "edit_report", input => "fail:yes no", output => { "fail" => "yes", default => "no", }, }, { label => "grade:action action grade:action", option => "edit_report", input => "fail:yes no fail:no", output => { "fail" => "no", default => "no", }, }, { label => "grade:action action grade2:action", option => "edit_report", input => "fail:yes no na:no", output => { "fail" => "yes", "na" => "no", default => "no", }, }, { label => "grade/grade2:action", option => "edit_report", input => "fail/na:ask/yes", output => { "fail" => "ask/yes", "na" => "ask/yes", }, }, { label => "grade/grade2", option => "edit_report", input => "fail/na", output => { "fail" => "yes", "na" => "yes", }, }, ); my @bad_cases = ( { label => "bad grade", option => "edit_report", input => "failed", output => undef, msg => "/ignoring invalid grade:action 'failed' for 'edit_report'/", }, { label => "bad action", option => "edit_report", input => "fail:run-away", output => undef, msg => "/ignoring invalid action 'run-away' in 'fail:run-away' for 'edit_report'/", }, ); plan tests => 1 + 2 * ( @good_cases + @bad_cases ); #--------------------------------------------------------------------------# # Begin tests #--------------------------------------------------------------------------# require_ok( "CPAN::Reporter::Config" ); for my $case ( @good_cases, @bad_cases ) { my $got; my ($stdout, $stderr) = capture { $got = CPAN::Reporter::Config::_validate_grade_action_pair( $case->{option}, $case->{input} ); }; is_deeply( $got, $case->{output}, $case->{label} ); if ( $case->{msg} ) { like( $stdout, $case->{msg}, $case->{label} ); } else { is( $stdout, '', "No warnings seen" ); } } 13_record_command.t100644000765000024 1157714423611161 17373 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use Helper; use Frontend; use Config; use File::Temp (); use Capture::Tiny qw/capture/; use Probe::Perl (); #--------------------------------------------------------------------------# # fixtures #--------------------------------------------------------------------------# my $perl = Probe::Perl->find_perl_interpreter(); $perl = qq{"$perl"}; my $quote = $^O eq 'MSWin32' || $^O eq 'MSDOS' ? q{"} : q{'}; #--------------------------------------------------------------------------# # Test planning #--------------------------------------------------------------------------# my @cases = ( { label => "Exit with 0", program => 'print qq{foo\n}; exit 0', args => '', output => [ "foo\n" ], exit_code => 0, }, { label => "Exit with 1", program => 'print qq{foo\n}; exit 1', args => '', output => [ "foo\n" ], exit_code => 1 << 8, }, { label => "Exit with 2", program => 'print qq{foo\n}; exit 2', args => '', output => [ "foo\n" ], exit_code => 2 << 8, }, { label => "Exit with args in shell quotes", program => 'print qq{foo $ARGV[0]\n}; exit 0', args => "${quote}apples oranges bananas${quote}", output => [ "foo apples oranges bananas\n" ], exit_code => 0, }, { label => "Exit with args and pipe", program => 'print qq{foo @ARGV\n}; exit 1', args => "bar=1 | $perl -pe 0", output => [ "foo bar=1\n" ], exit_code => 1 << 8, }, { label => "Timeout kills process", program => '$now=time(); 1 while( time() - $now < 60); print qq{foo\n}; exit 0', args => '', output => [], delay => 60, timeout => 5, exit_code => 9, }, { label => "Timeout not reached", program => '$now=time(); 1 while( time() - $now < 2); print qq{foo\n}; exit 0', args => '', output => ["foo\n"], delay => 2, timeout => 30, exit_code => 0, }, { label => "Timeout not reached (quoted args)", program => '$now=time(); 1 while( time() - $now < 2); print qq{foo $ARGV[0]\n}; exit 0', args => "${quote}apples oranges bananas${quote}", output => [ "foo apples oranges bananas\n" ], delay => 2, timeout => 30, exit_code => 0, }, ); my $tests_per_case = 4; plan tests => 1 + $tests_per_case * @cases; #--------------------------------------------------------------------------# # tests #--------------------------------------------------------------------------# require_ok( "CPAN::Reporter" ); for my $c ( @cases ) { SKIP: { if ( $^O eq 'MSWin32' && $c->{timeout} ) { skip "\$ENV{PERL_AUTHOR_TESTING} required for Win32 timeout testing", $tests_per_case unless $ENV{PERL_AUTHOR_TESTING}; eval "use Win32::Job ()"; skip "Win32::Job needed for timeout testing", $tests_per_case if $@; } my $fh = File::Temp->new() or die "Couldn't create a temporary file: $!\nIs your temp drive full?"; print {$fh} $c->{program}, "\n"; $fh->flush; my ($output, $exit); my ($stdout, $stderr); my $start_time = time(); my $cmd = $perl; warn "# sleeping for timeout test\n" if $c->{timeout}; eval { ($stdout, $stderr) = capture { ($output, $exit) = CPAN::Reporter::record_command( "$cmd $fh $c->{args}", $c->{timeout} ); }; }; sleep 1; # pad the run time into the next second my $run_time = time() - $start_time; diag $@ if $@; if ( $c->{timeout} ) { my ($time_ok, $verb, $range); if ( $c->{timeout} < $c->{delay} ) { # if process should time out $time_ok = $run_time <= $c->{delay}; $verb = "stopped"; $range = sprintf( "timeout (%d) : ran (%d) : sleep (%d)", $c->{timeout}, $run_time, $c->{delay} ); } else { # process should exit before timeout $time_ok = $run_time <= $c->{timeout}; $verb = "didn't stop"; $range = sprintf( "sleep (%d) : ran (%d) : timeout (%d)", $c->{delay}, $run_time, $c->{timeout} ); } ok( $time_ok, "$c->{label}: timeout $verb process") or diag $range; } else { pass "$c->{label}: No timeout requested"; } like( $stdout, "/" . quotemeta(join(q{},@$output)) . "/", "$c->{label}: captured stdout" ); is_deeply( $output, $c->{output}, "$c->{label}: output as expected" ) or diag "STDOUT:\n$stdout\n\nSTDERR:\n$stderr\n"; is( $exit, $c->{exit_code}, "$c->{label}: exit code correct" ); } # SKIP } 53_test_report_na.t100644000765000024 526614423611161 17431 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use MockCPANDist; use Frontend; use Helper; my @test_distros = ( # na { name => 't-PrereqPerl-NOK', prereq => { 'requires' => { perl => 42 } }, eumm_success => 0, eumm_grade => "na", eumm_msg => "Perl version too low", mb_success => 0, mb_grade => "na", mb_msg => "Perl version too low", }, { name => 'test.pl-PrereqPerl-NOK', prereq => { 'requires' => { perl => 42 } }, eumm_success => 0, eumm_grade => "na", eumm_msg => "Perl version too low", mb_success => 0, mb_grade => "na", mb_msg => "Perl version too low", }, { name => 't-NoSupport', prereq => { }, eumm_success => 0, eumm_grade => "na", eumm_msg => "This platform is not supported", mb_success => 0, mb_grade => "na", mb_msg => "This platform is not supported", }, { name => 't-OSUnsupported', prereq => { }, eumm_success => 0, eumm_grade => "na", eumm_msg => "This platform is not supported", mb_success => 0, mb_grade => "na", mb_msg => "This platform is not supported", }, { name => 'test.pl-OSUnsupported', prereq => { }, eumm_success => 0, eumm_grade => "na", eumm_msg => "This platform is not supported", mb_success => 0, mb_grade => "na", mb_msg => "This platform is not supported", }, { name => 't-RequirePerl', prereq => { }, eumm_success => 0, eumm_grade => "na", eumm_msg => "Perl version too low", mb_success => 0, mb_grade => "na", mb_msg => "Perl version too low", }, ); plan tests => 1 + test_fake_config_plan() + test_grade_test_plan() * @test_distros; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# #--------------------------------------------------------------------------# # tests #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); test_fake_config(); for my $case ( @test_distros ) { my $mock_dist = MockCPANDist->new( pretty_id => "JOHNQP/Bogus-Module-1.23.tar.gz", prereq_pm => $case->{prereq}, author_id => "JOHNQP", author_fullname => "John Q. Public", ); test_grade_test( $case, $mock_dist ); } 57_hang_interrupt.t100644000765000024 525214423611161 17431 0ustar00garustaff000000000000CPAN-Reporter-1.2019/tuse strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } use Test::More; use lib 't/lib'; use MockCPANDist; use Helper; use Frontend; use Config; use Probe::Perl; use File::Temp; #--------------------------------------------------------------------------# # Skip on Win32 except for release testing #--------------------------------------------------------------------------# if ( $^O eq "MSWin32" ) { plan skip_all => "\$ENV{RELEASE_TESTING} required for Win32 timeout testing", unless $ENV{RELEASE_TESTING}; eval "use Win32::Job ()"; plan skip_all => "Can't interrupt hung processes without Win32::Job" if $@; } #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my $make = $Config{make}; my $perl = Probe::Perl->find_perl_interpreter(); my %mock_dist_options = ( prereq_pm => { requires => { 'File::Spec' => 0, }, }, author_id => "JOHNQP", author_fullname => "John Q. Public", ); my @cases = ( { label => "t-Pass", pretty_id => "JOHNQP/Bogus-Module-1.23.tar.gz", name => "t-Pass", version => 1.23, grade => "pass", phase => "test", command => "$make test", will_send => 1, }, { label => "t-Fail", pretty_id => "JOHNQP/Bogus-Module-1.23.tar.gz", name => "t-Fail", version => 1.23, grade => "fail", phase => "test", command => "$make test", will_send => 1, }, { label => "PL-Hang", pretty_id => "JOHNQP/Bogus-Module-1.23.tar.gz", name => "PL-Hang", version => 1.23, grade => "discard", phase => "PL", command => "$perl Makefile.PL", will_send => 0, }, { label => "t-Hang", pretty_id => "JOHNQP/Bogus-Module-1.23.tar.gz", name => "t-Hang", version => 1.23, grade => "discard", phase => "test", command => "$make test", will_send => 0, }, ); plan tests => 1 + @cases * (test_fake_config_plan() + test_dispatch_plan()); #--------------------------------------------------------------------------# # tests #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); # test send_skipfile for my $case ( @cases ) { $case->{dist} = MockCPANDist->new( pretty_id => $case->{pretty_id}, %mock_dist_options, ); test_fake_config( command_timeout => 3 ); test_dispatch( $case, will_send => $case->{will_send}, ); } 61_bad_dist_names.t100644000765000024 622714423611161 17332 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use MockCPANDist; use Helper; use Frontend; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my %mock_dist_info = ( pretty_id => "PLACEHOLDER", prereq_pm => {}, author_id => "JOHNQP", author_fullname => "John Q. Public", ); my %standard_case_info = ( name => "t-Fail", grade => "fail", phase => "test", command => "make test", ); my @cases = ( { label => "proper distribution name (tar.gz)", pretty_id => "JOHNQP/Bogus-Module-1.21.tar.gz", will_send => 1, }, { label => "proper distribution name (tar.bz2)", pretty_id => "JOHNQP/Bogus-Module-1.22.tar.gz", will_send => 1, }, { label => "proper distribution name (tgz)", pretty_id => "JOHNQP/Bogus-Module-1.23.tgz", will_send => 1, }, { label => "proper distribution name (zip)", pretty_id => "JOHNQP/Bogus-Module-1.24.zip", will_send => 1, }, { label => "proper distribution name (ZIP)", pretty_id => "JOHNQP/Bogus-Module-1.25.ZIP", will_send => 1, }, { label => "proper distribution name (v1.23)", pretty_id => "JOHNQP/Bogus-Module-v1.26.tgz", will_send => 1, }, { label => "proper distribution name (1.2_01)", pretty_id => "JOHNQP/Bogus-Module-1.2_01.tgz", will_send => 1, }, { label => "proper distribution name (v1.2a)", pretty_id => "JOHNQP/Bogus-Module-v1.2a.tgz", will_send => 1, }, { label => "proper distribution name (v1.2_01)", pretty_id => "JOHNQP/Bogus-Module-v1.2_02.tgz", will_send => 1, }, { label => "missing extension", pretty_id => "JOHNQP/Bogus-Module-1.31", will_send => 0, }, { label => "missing version", pretty_id => "JOHNQP/Bogus-Module.tgz", will_send => 0, }, { label => "raw pm file", pretty_id => "JOHNQP/Module.pm", will_send => 0, }, ); plan tests => 2 + test_fake_config_plan() + (1 + test_dispatch_plan()) * @cases; #--------------------------------------------------------------------------# # tests #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); require_ok('CPAN::Reporter::History'); test_fake_config(); for my $case ( @cases ) { $case->{dist} = MockCPANDist->new( %mock_dist_info ); $case->{dist}{pretty_id} = $case->{pretty_id}; $case->{$_} = $standard_case_info{$_} for keys %standard_case_info; test_dispatch( $case, will_send => $case->{will_send} ); my $hist_grade = $case->{will_send} ? 'FAIL' : 'DISCARD'; ok( scalar CPAN::Reporter::History::have_tested( dist => $case->{dist}->base_id, grade => $hist_grade, ), $case->{dist}->pretty_id . " seen in history as $hist_grade" ); } 71_missing_config.t100644000765000024 363314423611161 17373 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use MockCPANDist; use Helper; use Frontend; use Capture::Tiny qw/capture/; my @test_distros = ( # pass { name => 't-Pass', eumm_success => 1, eumm_grade => "pass", eumm_msg => "All tests successful", mb_success => 1, mb_grade => "pass", mb_msg => "All tests successful", }, { name => 't-Fail', eumm_success => 0, eumm_grade => "fail", eumm_msg => "One or more tests failed", mb_success => 0, mb_grade => "fail", mb_msg => "One or more tests failed", }, ); plan tests => 1 + test_grade_test_plan() * @test_distros + 3; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my $mock_dist = MockCPANDist->new( pretty_id => "JOHNQP/Bogus-Module-1.23.tar.gz", prereq_pm => { requires => { 'File::Spec' => 0 }, }, author_id => "JOHNQP", author_fullname => "John Q. Public", ); #--------------------------------------------------------------------------# # tests #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); # Config file not created in advance with test_config() for my $case ( @test_distros ) { test_grade_test( $case, $mock_dist ); } # Test warning messages my ($stdout, $stderr) = capture { CPAN::Reporter::_dispatch_report( {} ); }; like( $stdout, "/couldn't read configuration file/", "config file not found warnings" ); like( $stdout, "/required 'email_from' option missing an email address/", "email address required warning" ); like( $stdout, "/report will not be sent/", "report not sent notice" ); 72_rename_history.t100644000765000024 516114423611161 17424 0ustar00garustaff000000000000CPAN-Reporter-1.2019/tuse strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use Config::Tiny; use Capture::Tiny qw/capture/; use File::Copy qw/copy/; use File::Path qw/mkpath/; use File::Spec::Functions qw/catdir catfile rel2abs/; use File::Temp qw/tempdir/; use lib 't/lib'; use Frontend; use MockHomeDir; #plan 'no_plan'; plan tests => 12; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my $config_dir = catdir( MockHomeDir::home_dir, ".cpanreporter" ); my $config_file = catfile( $config_dir, "config.ini" ); my $old_history_file = catfile( $config_dir, "history.db" ); my $new_history_file = catfile( $config_dir, "reports-sent.db" ); my $sample_old_file = catfile(qw/t history history.db/); my $sample_new_file = catfile(qw/t history reports-sent.db/); my ($rc, $stdout, $stderr); #--------------------------------------------------------------------------# sub re_require { delete $INC{'CPAN/Reporter/History.pm'}; eval { ($stdout, $stderr) = capture { require_ok( "CPAN::Reporter::History" ); }; }; die $@ if $@; return 1; } sub mtime { return (stat shift)[9]; } sub read_file { my $fh = IO::File->new(shift); local $/; return scalar <$fh>; } #--------------------------------------------------------------------------## # begin testing #--------------------------------------------------------------------------# mkpath( $config_dir ); ok( -d $config_dir, "temporary config dir created" ); ok( ! -f $old_history_file && ! -f $new_history_file, "no history files yet"); # Nothing should be created if nothing exists re_require(); ok( ! -f $old_history_file && ! -f $new_history_file, "still no history files"); # If old history exists, convert it copy( $sample_old_file, $old_history_file); ok( -f $old_history_file, "copied sample old history file to config directory"); re_require(); like( $stdout, "/Upgrading automatically/", "saw upgrading notice" ); ok( -f $old_history_file, "old history file still exists" ); ok( -f $new_history_file, "new history file was created" ); my $expected_file = scalar read_file($sample_new_file); $expected_file =~ s/VERSION/$CPAN::Reporter::History::VERSION/; is( scalar read_file($new_history_file), $expected_file, "new history contents as expected" ); # If new history exists, leave it alone my $mtime = mtime( $new_history_file ); sleep(2); # ensure mtime check works re_require(); is( mtime($new_history_file), $mtime, "new history file unmodified" ); MockCPANDist.pm100644000765000024 277214423611161 17167 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/libpackage MockCPANDist; use strict; BEGIN { if ( not $] < 5.006 ) { require warnings; warnings->import } } use File::Basename; #--------------------------------------------------------------------------# my $simulate_bad_author = 0; sub import { my $class = shift; $simulate_bad_author = grep { $_ eq 'bad_author' } @_; } #--------------------------------------------------------------------------# my %spec = ( prereq_pm => 'HASH', pretty_id => q{}, author_id => q{}, author_fullname => q{}, ); sub new { my ($class) = shift; die "Arguments to MockCPANDist::new() must be key => value pairs" if (@_ % 2); my %args = @_; for my $key ( keys %spec ) { if ( ! exists $args{$key} || ( defined ref $args{$key} && ref $args{$key} ne $spec{$key} ) ) { die "Argument '$key' must be a " . (defined $spec{$key} ? "$spec{$key} reference" : "scalar" ); } } bless \%args, $class; } # cheat on author() and let the mock handle it all unless we want it to fail sub author { return $simulate_bad_author ? undef : shift } sub prereq_pm { return shift->{prereq_pm} } sub pretty_id { return shift->{pretty_id} } sub id { return shift->{author_id} } sub fullname { return shift->{author_fullname} } sub base_id { my $self = shift; my $id = $self->pretty_id(); my $base_id = File::Basename::basename($id); $base_id =~ s{\.(?:tar\.(bz2|gz|Z)|t(?:gz|bz)|zip)$}{}i; return $base_id; } 1; 00-report-prereqs.t100644000765000024 1360114423611161 17311 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; use warnings; # This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.029 use Test::More tests => 1; use ExtUtils::MakeMaker; use File::Spec; # from $version::LAX my $lax_version_re = qr/(?: undef | (?: (?:[0-9]+) (?: \. | (?:\.[0-9]+) (?:_[0-9]+)? )? | (?:\.[0-9]+) (?:_[0-9]+)? ) | (?: v (?:[0-9]+) (?: (?:\.[0-9]+)+ (?:_[0-9]+)? )? | (?:[0-9]+)? (?:\.[0-9]+){2,} (?:_[0-9]+)? ) )/x; # hide optional CPAN::Meta modules from prereq scanner # and check if they are available my $cpan_meta = "CPAN::Meta"; my $cpan_meta_pre = "CPAN::Meta::Prereqs"; my $HAS_CPAN_META = eval "require $cpan_meta; $cpan_meta->VERSION('2.120900')" && eval "require $cpan_meta_pre"; ## no critic # Verify requirements? my $DO_VERIFY_PREREQS = 1; sub _max { my $max = shift; $max = ( $_ > $max ) ? $_ : $max for @_; return $max; } sub _merge_prereqs { my ($collector, $prereqs) = @_; # CPAN::Meta::Prereqs object if (ref $collector eq $cpan_meta_pre) { return $collector->with_merged_prereqs( CPAN::Meta::Prereqs->new( $prereqs ) ); } # Raw hashrefs for my $phase ( keys %$prereqs ) { for my $type ( keys %{ $prereqs->{$phase} } ) { for my $module ( keys %{ $prereqs->{$phase}{$type} } ) { $collector->{$phase}{$type}{$module} = $prereqs->{$phase}{$type}{$module}; } } } return $collector; } my @include = qw( ); my @exclude = qw( ); # Add static prereqs to the included modules list my $static_prereqs = do './t/00-report-prereqs.dd'; # Merge all prereqs (either with ::Prereqs or a hashref) my $full_prereqs = _merge_prereqs( ( $HAS_CPAN_META ? $cpan_meta_pre->new : {} ), $static_prereqs ); # Add dynamic prereqs to the included modules list (if we can) my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; my $cpan_meta_error; if ( $source && $HAS_CPAN_META && (my $meta = eval { CPAN::Meta->load_file($source) } ) ) { $full_prereqs = _merge_prereqs($full_prereqs, $meta->prereqs); } else { $cpan_meta_error = $@; # capture error from CPAN::Meta->load_file($source) $source = 'static metadata'; } my @full_reports; my @dep_errors; my $req_hash = $HAS_CPAN_META ? $full_prereqs->as_string_hash : $full_prereqs; # Add static includes into a fake section for my $mod (@include) { $req_hash->{other}{modules}{$mod} = 0; } for my $phase ( qw(configure build test runtime develop other) ) { next unless $req_hash->{$phase}; next if ($phase eq 'develop' and not $ENV{AUTHOR_TESTING}); for my $type ( qw(requires recommends suggests conflicts modules) ) { next unless $req_hash->{$phase}{$type}; my $title = ucfirst($phase).' '.ucfirst($type); my @reports = [qw/Module Want Have/]; for my $mod ( sort keys %{ $req_hash->{$phase}{$type} } ) { next if grep { $_ eq $mod } @exclude; my $want = $req_hash->{$phase}{$type}{$mod}; $want = "undef" unless defined $want; $want = "any" if !$want && $want == 0; if ($mod eq 'perl') { push @reports, ['perl', $want, $]]; next; } my $req_string = $want eq 'any' ? 'any version required' : "version '$want' required"; my $file = $mod; $file =~ s{::}{/}g; $file .= ".pm"; my ($prefix) = grep { -e File::Spec->catfile($_, $file) } @INC; if ($prefix) { my $have = MM->parse_version( File::Spec->catfile($prefix, $file) ); $have = "undef" unless defined $have; push @reports, [$mod, $want, $have]; if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META && $type eq 'requires' ) { if ( $have !~ /\A$lax_version_re\z/ ) { push @dep_errors, "$mod version '$have' cannot be parsed ($req_string)"; } elsif ( ! $full_prereqs->requirements_for( $phase, $type )->accepts_module( $mod => $have ) ) { push @dep_errors, "$mod version '$have' is not in required range '$want'"; } } } else { push @reports, [$mod, $want, "missing"]; if ( $DO_VERIFY_PREREQS && $type eq 'requires' ) { push @dep_errors, "$mod is not installed ($req_string)"; } } } if ( @reports ) { push @full_reports, "=== $title ===\n\n"; my $ml = _max( map { length $_->[0] } @reports ); my $wl = _max( map { length $_->[1] } @reports ); my $hl = _max( map { length $_->[2] } @reports ); if ($type eq 'modules') { splice @reports, 1, 0, ["-" x $ml, "", "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s\n", -$ml, $_->[0], $hl, $_->[2]) } @reports; } else { splice @reports, 1, 0, ["-" x $ml, "-" x $wl, "-" x $hl]; push @full_reports, map { sprintf(" %*s %*s %*s\n", -$ml, $_->[0], $wl, $_->[1], $hl, $_->[2]) } @reports; } push @full_reports, "\n"; } } } if ( @full_reports ) { diag "\nVersions for all modules listed in $source (including optional ones):\n\n", @full_reports; } if ( $cpan_meta_error || @dep_errors ) { diag "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n"; } if ( $cpan_meta_error ) { my ($orig_source) = grep { -f } 'MYMETA.json', 'MYMETA.yml'; diag "\nCPAN::Meta->load_file('$orig_source') failed with: $cpan_meta_error\n"; } if ( @dep_errors ) { diag join("\n", "\nThe following REQUIRED prerequisites were not satisfied:\n", @dep_errors, "\n" ); } pass('Reported prereqs'); # vim: ts=4 sts=4 sw=4 et: pod-spell.t100644000765000024 121714423611161 17453 0ustar00garustaff000000000000CPAN-Reporter-1.2019/xt/authoruse strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::PodSpelling 2.007005 use Test::Spelling 0.12; use Pod::Wordlist; add_stopwords(); all_pod_files_spelling_ok( qw( bin lib ) ); __DATA__ API Alexandr Atria Breno CPAN Cantrell Christian Ciornii Clement Config David Ed FAQ Fredric Golden Graham History James Joaquín José Keenan Kent Knop Maslak Matthew Musgrove Oliveira Patrice PrereqCheck Reini Reporter Rezic Scott Slaven Urban Walde Wiersdorf alexchorny cpanreporter dagolden david de exe garu haarg jjatria jkeenan jmaslak kentfredric lib metabase mohawk2 monsieurp mr na rurban scott skipfile slaven walde t-Fail000755000765000024 014423611161 15720 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 34514423611161 17336 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Failuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; t-Hang000755000765000024 014423611161 15722 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 34514423611161 17340 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Hanguse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; t-Pass000755000765000024 014423611161 15753 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 34514423611161 17371 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Passuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; 02_config_env_vars.t100644000765000024 544114423611161 17536 0ustar00garustaff000000000000CPAN-Reporter-1.2019/tuse strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } use Test::More; use Config::Tiny; use File::Basename qw/basename/; use File::Spec; use File::Temp qw/tempdir/; use lib 't/lib'; use Frontend; use MockHomeDir; plan tests => 10; #plan 'no_plan'; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# # File::HomeDir will be mocked to return these my $default_home_dir = MockHomeDir::home_dir; my $default_config_dir = File::Spec->catdir( $default_home_dir, ".cpanreporter" ); my $default_config_file = File::Spec->catfile( $default_config_dir, "config.ini" ); # These will be tested via ENV vars my $alt_home = tempdir( "CPAN-Reporter-testhome-XXXXXXXX", TMPDIR => 1, CLEANUP => 1 ) or die "Couldn't create a temporary config directory: $!\nIs your temp drive full?"; my $alt_home_dir = File::Spec->rel2abs( $alt_home ); my $alt_config_dir = File::Spec->catdir( $alt_home_dir, ".cpanreporter" ); my $alt_config_file = File::Spec->catfile( $alt_config_dir, "config.ini" ); # Secondary config files to check setting config file but config dir my $default_dir_alt_file = File::Spec->catfile( $default_config_dir, "altconfig.ini" ); my $alt_dir_alt_file = File::Spec->catfile( $alt_config_dir, "altconfig.ini" ); #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); require_ok('CPAN::Reporter::Config'); is( CPAN::Reporter::Config::_get_config_dir(), $default_config_dir, "default config dir path" ); is( CPAN::Reporter::Config::_get_config_file(), $default_config_file, "default config file path" ); # override config file { local $ENV{PERL_CPAN_REPORTER_CONFIG} = $default_dir_alt_file; is( CPAN::Reporter::Config::_get_config_dir(), $default_config_dir, "PERL_CPAN_REPORTER_CONFIG: default config dir path" ); is( CPAN::Reporter::Config::_get_config_file(), $default_dir_alt_file, "PERL_CPAN_REPORTER_CONFIG: alt config file path" ); } # override config dir { local $ENV{PERL_CPAN_REPORTER_DIR} = $alt_config_dir; is( CPAN::Reporter::Config::_get_config_dir(), $alt_config_dir, "PERL_CPAN_REPORTER_DIR: default config dir path" ); is( CPAN::Reporter::Config::_get_config_file(), $alt_config_file, "PERL_CPAN_REPORTER_DIR: alt config file path" ); } # override config dir and config file { local $ENV{PERL_CPAN_REPORTER_DIR} = $alt_config_dir; local $ENV{PERL_CPAN_REPORTER_CONFIG} = $alt_dir_alt_file; is( CPAN::Reporter::Config::_get_config_dir(), $alt_config_dir, "DIR + CONFIG: alt config dir path" ); is( CPAN::Reporter::Config::_get_config_file(), $alt_dir_alt_file, "DIR + CONFIG: alt config file path" ); } 10_prereq_computed.t100644000765000024 130114423611161 17552 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } use FindBin; use File::Temp 'tempfile'; use Test::More tests => 1; use CPAN::Reporter::PrereqCheck (); { my($tmpfh,$tmpfile) = tempfile(UNLINK => 1); print $tmpfh <&", \*STDOUT; close STDOUT; my $output = ''; open STDOUT, ">", \$output; CPAN::Reporter::PrereqCheck::_run(); ## put things back open STDOUT, ">&", \*OLDOUT; is $output, "Bogus::ComputedVersion 1 1.00\n"; } 14_command_timeout.t100644000765000024 1570414423611161 17600 0ustar00garustaff000000000000CPAN-Reporter-1.2019/tuse strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use Helper; use Frontend; use Config; use File::Temp (); use Capture::Tiny qw/capture/; use Probe::Perl (); #--------------------------------------------------------------------------# # Skip on Win32 except for release testing #--------------------------------------------------------------------------# if ( $^O eq "MSWin32" ) { plan skip_all => "\$ENV{RELEASE_TESTING} required for Win32 timeout testing", unless $ENV{RELEASE_TESTING}; eval "use Win32::Job ()"; plan skip_all => "Can't interrupt hung processes without Win32::Job" if $@; } #--------------------------------------------------------------------------# # fixtures #--------------------------------------------------------------------------# my $perl = Probe::Perl->find_perl_interpreter(); my $quote = $^O eq 'MSWin32' || $^O eq 'MSDOS' ? q{"} : q{'}; #--------------------------------------------------------------------------# # Test planning #--------------------------------------------------------------------------# my @cases = ( { label => "regular < global < delay", program => '$now=time(); 1 while( time() - $now < 60); print qq{foo\n}; exit 0', output => [], timeout => 5, command_timeout => 30, delay => 60, exit_code => 9, }, { label => "regular < delay < global", program => '$now=time(); 1 while( time() - $now < 30); print qq{foo\n}; exit 0', output => [], timeout => 5, delay => 30, command_timeout => 60, exit_code => 9, }, { label => "global < regular < delay", program => '$now=time(); 1 while( time() - $now < 60); print qq{foo\n}; exit 0', output => [], command_timeout => 2, timeout => 5, delay => 60, exit_code => 9, }, { label => "global < delay < regular", program => '$now=time(); 1 while( time() - $now < 5); print qq{foo\n}; exit 0', output => ["foo\n"], command_timeout => 2, delay => 5, timeout => 60, exit_code => 0, }, { label => "delay < regular < global", program => '$now=time(); 1 while( time() - $now < 2); print qq{foo\n}; exit 0', output => ["foo\n"], delay => 2, timeout => 30, command_timeout => 60, exit_code => 0, }, { label => "delay < global < regular", program => '$now=time(); 1 while( time() - $now < 2); print qq{foo\n}; exit 0', output => ["foo\n"], delay => 2, command_timeout => 30, timeout => 60, exit_code => 0, }, { label => "global < delay", program => '$now=time(); 1 while( time() - $now < 30); print qq{foo\n}; exit 0', output => [], command_timeout => 5, delay => 30, exit_code => 9, }, { label => "delay < global", program => '$now=time(); 1 while( time() - $now < 2); print qq{foo\n}; exit 0', output => ["foo\n"], delay => 2, command_timeout => 30, exit_code => 0, }, ); my $tests_per_case = 4 + test_fake_config_plan(); plan tests => 1 + $tests_per_case * @cases; #--------------------------------------------------------------------------# # tests #--------------------------------------------------------------------------# require_ok( "CPAN::Reporter" ); for my $c ( @cases ) { SKIP: { skip "Couldn't run perl with relative path", $tests_per_case if $c->{relative} && system("perl -e 1") == -1; my @extra_config = $c->{command_timeout} ? ( command_timeout => $c->{command_timeout} ) : (); test_fake_config( @extra_config ); my $fh = File::Temp->new( UNLINK => ! $ENV{PERL_CR_NO_CLEANUP} ) or die "Couldn't create a temporary file: $!\nIs your temp drive full?"; print {$fh} $c->{program}, "\n"; $fh->flush; my ($output, $exit); my ($stdout, $stderr); my $start_time = time(); my $cmd = $c->{relative} ? "perl" : $perl; $cmd .= " $fh"; warn "# sleeping for timeout test\n" if $c->{delay}; eval { ($stdout, $stderr) = capture { ($output, $exit) = CPAN::Reporter::record_command( $cmd, $c->{timeout} ); }; }; sleep 1; # pad the run time into the next second my $run_time = time() - $start_time; diag $@ if $@; my ($time_ok, $who, $diag); if ( $c->{timeout} ) { # (A) program delay, (B) regular timeout, (C) command timeout # ABC, ACB, BAC, BCA, CAB, CBA # Option 1 -- program ends before either timeout (ABC, ACB) if ( $c->{delay} < $c->{command_timeout} && $c->{delay} < $c->{timeout} ) { my ($next_t) = sort {$a <=> $b} ($c->{timeout}, $c->{command_timeout}); $time_ok = $run_time < $next_t; $who = "no"; } # Option 2 -- regular before program or command (BAC, BCA) elsif ( $c->{timeout} < $c->{command_timeout} && $c->{timeout} < $c->{delay} ) { my ($next_t) = sort {$a <=> $b} ($c->{delay},$c->{command_timeout}); $time_ok = $run_time < $next_t; $who = "regular"; } # Option 3 -- command before program or regular (CAB, CBA) # C does nothing so are A,B in right order? else { # command timeout should be the default if ( $c->{timeout} < $c->{delay} ) { # did command timeout kill? $time_ok = $run_time < $c->{delay}; $who = "regular" } else { # did no timeout happen $time_ok = $run_time < $c->{timeout}; $who = "no" } } $diag = sprintf( "timeout (%d) : command_timeout (%d) : ran (%d) : sleep (%d)", $c->{timeout}, $c->{command_timeout}, $run_time, $c->{delay} ); } else { # command timeout should be the default $diag = sprintf( "timeout (%d) : ran (%d) : sleep (%d)", $c->{command_timeout}, $run_time, $c->{delay} ); if ( $c->{command_timeout} < $c->{delay} ) { # did command timeout kill? $time_ok = $run_time < $c->{delay}; $who = "command" } else { # did no timeout happen $time_ok = $run_time < $c->{command_timeout}; $who = "no" } } ok( $time_ok, "$c->{label}: $who timeout") or diag $diag; like( $stdout, "/" . quotemeta(join(q{},@{ $output || [] })) . "/", "$c->{label}: captured stdout" ); is_deeply( $output, $c->{output}, "$c->{label}: output as expected" ) or diag "STDOUT:\n$stdout\n\nSTDERR:\n$stderr\n"; is( $exit, $c->{exit_code}, "$c->{label}: exit code correct" ); } # SKIP } Bogus000755000765000024 014423611161 16331 5ustar00garustaff000000000000CPAN-Reporter-1.2019/t/perl5libGT.pm100644000765000024 6314423611161 17300 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/perl5lib/Boguspackage Bogus::GT; $VERSION = 3.14; use strict; 1; LT.pm100644000765000024 6314423611161 17305 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/perl5lib/Boguspackage Bogus::LT; $VERSION = 3.14; use strict; 1; 00-compile.t100644000765000024 311514423611161 17420 0ustar00garustaff000000000000CPAN-Reporter-1.2019/xt/authoruse 5.006; use strict; use warnings; # this test was generated with Dist::Zilla::Plugin::Test::Compile 2.058 use Test::More; plan tests => 7; my @module_files = ( 'CPAN/Reporter.pm', 'CPAN/Reporter/API.pm', 'CPAN/Reporter/Config.pm', 'CPAN/Reporter/FAQ.pm', 'CPAN/Reporter/History.pm', 'CPAN/Reporter/PrereqCheck.pm' ); # fake home for cpan-testers use File::Temp; local $ENV{HOME} = File::Temp::tempdir( CLEANUP => 1 ); my @switches = ( -d 'blib' ? '-Mblib' : '-Ilib', ); use File::Spec; use IPC::Open3; use IO::Handle; open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!"; my @warnings; for my $lib (@module_files) { # see L my $stderr = IO::Handle->new; diag('Running: ', join(', ', map { my $str = $_; $str =~ s/'/\\'/g; q{'} . $str . q{'} } $^X, @switches, '-e', "require q[$lib]")) if $ENV{PERL_COMPILE_TEST_DEBUG}; my $pid = open3($stdin, '>&STDERR', $stderr, $^X, @switches, '-e', "require q[$lib]"); binmode $stderr, ':crlf' if $^O eq 'MSWin32'; my @_warnings = <$stderr>; waitpid($pid, 0); is($?, 0, "$lib loaded ok"); shift @_warnings if @_warnings and $_warnings[0] =~ /^Using .*\bblib/ and not eval { +require blib; blib->VERSION('1.01') }; if (@_warnings) { warn @_warnings; push @warnings, @_warnings; } } is(scalar(@warnings), 0, 'no warnings found') or diag 'got warnings: ', ( Test::More->can('explain') ? Test::More::explain(\@warnings) : join("\n", '', @warnings) ); 00-report-prereqs.dd100644000765000024 1114414423611161 17435 0ustar00garustaff000000000000CPAN-Reporter-1.2019/tdo { my $x = { 'configure' => { 'requires' => { 'ExtUtils::MakeMaker' => '6.17', 'perl' => '5.006' }, 'suggests' => { 'JSON::PP' => '2.27300' } }, 'develop' => { 'requires' => { 'Dist::Zilla' => '5', 'Dist::Zilla::Plugin::Prereqs' => '0', 'Dist::Zilla::Plugin::RemovePrereqs' => '0', 'Dist::Zilla::PluginBundle::DAGOLDEN' => '0.072', 'File::Spec' => '0', 'File::Temp' => '0', 'IO::Handle' => '0', 'IPC::Open3' => '0', 'Pod::Coverage::TrustPod' => '0', 'Pod::Wordlist' => '0', 'Software::License::Apache_2_0' => '0', 'Test::CPAN::Meta' => '0', 'Test::MinimumVersion' => '0', 'Test::More' => '0', 'Test::Perl::Critic' => '0', 'Test::Pod' => '1.41', 'Test::Pod::Coverage' => '1.08', 'Test::Portability::Files' => '0', 'Test::Spelling' => '0.12', 'Test::Version' => '1', 'perl' => '5.006', 'warnings' => '0' } }, 'runtime' => { 'requires' => { 'CPAN' => '1.94', 'CPAN::Version' => '0', 'Capture::Tiny' => '0', 'Carp' => '0', 'Config::Tiny' => '2.08', 'Data::Dumper' => '0', 'Devel::Autoflush' => '0.04', 'Exporter' => '0', 'ExtUtils::MakeMaker' => '6.36', 'Fcntl' => '0', 'File::Basename' => '0', 'File::Find' => '0', 'File::Glob' => '0', 'File::HomeDir' => '0.58', 'File::Path' => '0', 'File::Spec' => '3.19', 'File::Temp' => '0.16', 'IO::File' => '0', 'IPC::Cmd' => '0.76', 'Parse::CPAN::Meta' => '0', 'Probe::Perl' => '0', 'Test::Reporter' => '1.54', 'constant' => '0', 'perl' => '5.008', 'strict' => '0', 'vars' => '0' } }, 'test' => { 'recommends' => { 'CPAN::Meta' => '2.120900' }, 'requires' => { 'Archive::Tar' => '1.54', 'ExtUtils::MakeMaker' => '6.36', 'File::Copy' => '0', 'File::Spec' => '3.19', 'File::Spec::Functions' => '0', 'File::pushd' => '0.32', 'FindBin' => '0', 'IO::Handle' => '0', 'Test::Harness' => '0', 'Test::More' => '0.62', 'lib' => '0', 'perl' => '5.008', 'warnings' => '0' } } }; $x; }pod-syntax.t100644000765000024 25214423611161 17640 0ustar00garustaff000000000000CPAN-Reporter-1.2019/xt/author#!perl # This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests. use strict; use warnings; use Test::More; use Test::Pod 1.41; all_pod_files_ok(); PL-Fail000755000765000024 014423611161 15770 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 40414423611161 17402 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-Failuse strict; use Module::Build; die "Build.PL should die!\n"; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; PL-Hang000755000765000024 014423611161 15772 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 47314423611161 17412 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-Hanguse strict; use Module::Build; # just spin and be interrupted by command_timeout sleep 30; die "Fail, fail, fail!"; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; make-Fail000755000765000024 014423611161 16372 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusDie.PL100644000765000024 6414423611161 17430 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-Failuse strict; die "Problem making this distribution"; 50_test_report_pass.t100644000765000024 531514423611161 17771 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use MockCPANDist; use Helper; use Frontend; my @test_distros = ( # pass { name => 't-Pass', eumm_success => 1, eumm_grade => "pass", eumm_msg => "All tests successful", mb_success => 1, mb_grade => "pass", mb_msg => "All tests successful", }, { name => 'test.pl-Pass', eumm_success => 1, eumm_grade => "pass", eumm_msg => "'make test' no errors", mb_success => 1, mb_grade => "pass", mb_msg => "All tests successful", }, { name => 't-test.pl-Pass-Pass', eumm_success => 1, eumm_grade => "pass", eumm_msg => "'make test' no errors", mb_success => 1, mb_grade => "pass", mb_msg => "All tests successful", }, { name => 't-PrereqPerl-OK', eumm_success => 1, eumm_grade => "pass", eumm_msg => "All tests successful", mb_success => 1, mb_grade => "pass", mb_msg => "All tests successful", }, { name => 'test.pl-PrereqPerl-OK', eumm_success => 1, eumm_grade => "pass", eumm_msg => "'make test' no errors", mb_success => 1, mb_grade => "pass", mb_msg => "All tests successful", }, { name => 't-Recurse-Pass', eumm_success => 1, eumm_grade => "pass", eumm_msg => "'make test' no errors", mb_success => 1, mb_grade => "pass", mb_msg => "All tests successful", }, { name => 'custom-NoOutput-OK', eumm_success => 1, eumm_grade => "pass", eumm_msg => "'make test' no errors", mb_success => 1, mb_grade => "pass", mb_msg => "'Build test' no errors", }, ); plan tests => 1 + test_fake_config_plan() + test_grade_test_plan() * @test_distros; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my $mock_dist = MockCPANDist->new( pretty_id => "JOHNQP/Bogus-Module-1.23.tar.gz", prereq_pm => { requires => { 'File::Spec' => 0 }, }, author_id => "JOHNQP", author_fullname => "John Q. Public", ); #--------------------------------------------------------------------------# # tests #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); test_fake_config(); for my $case ( @test_distros ) { test_grade_test( $case, $mock_dist ); } 51_test_report_fail.t100644000765000024 540114423611161 17733 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use MockCPANDist; use Helper; use Frontend; my @test_distros = ( # fail { name => 't-BailOut', eumm_success => 0, eumm_grade => "fail", eumm_msg => "Bailed out of tests", mb_success => 0, mb_grade => "fail", mb_msg => "Bailed out of tests", }, { name => 't-Fail', eumm_success => 0, eumm_grade => "fail", eumm_msg => "One or more tests failed", mb_success => 0, mb_grade => "fail", mb_msg => "One or more tests failed", }, { name => 't-MultipleMatch', eumm_success => 0, eumm_grade => "fail", eumm_msg => "One or more tests failed", mb_success => 0, mb_grade => "fail", mb_msg => "One or more tests failed", }, { name => 'test.pl-Fail', eumm_success => 0, eumm_grade => "fail", eumm_msg => "'make test' error detected", mb_success => 0, mb_grade => "fail", mb_msg => "One or more tests failed", }, { name => 't-test.pl-Fail-Pass', eumm_success => 0, eumm_grade => "fail", eumm_msg => "'make test' error detected", mb_success => 0, mb_grade => "fail", mb_msg => "One or more tests failed", }, { name => 't-test.pl-Pass-NoOutput-NOK', eumm_success => 0, eumm_grade => "fail", eumm_msg => "'make test' error detected", mb_success => 0, mb_grade => "fail", mb_msg => "One or more tests failed", }, { name => 'custom-NoOutput-NOK', eumm_success => 0, eumm_grade => "fail", eumm_msg => "'make test' error detected", mb_success => 0, mb_grade => "fail", mb_msg => "'Build test' error detected", }, ); plan tests => 1 + test_fake_config_plan() + test_grade_test_plan() * @test_distros; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my $mock_dist = MockCPANDist->new( pretty_id => "JOHNQP/Bogus-Module-1.23.tar.gz", prereq_pm => { requires => { 'File::Spec' => 0 }, }, author_id => "JOHNQP", author_fullname => "John Q. Public", ); #--------------------------------------------------------------------------# # tests #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); test_fake_config(); for my $case ( @test_distros ) { test_grade_test( $case, $mock_dist ); } 60_discard_triggers.t100644000765000024 522214423611161 17706 0ustar00garustaff000000000000CPAN-Reporter-1.2019/tuse strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use MockCPANDist; use Helper; use Frontend; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my $mock_dist = MockCPANDist->new( pretty_id => "JOHNQP/Bogus-Module-1.23.tar.gz", prereq_pm => { requires => { 'File::Spec' => 0 }, }, author_id => "JOHNQP", author_fullname => "John Q. Public", ); my @cases = ( { label => "Build -j2", phase => "make", command => "Build -j2", output => "Output from './Build -j2'\n", exit_value => 1 << 8, result => { grade => "unknown" }, after => { grade => "discard", grade_msg => "-j is not a valid option for Module::Build (upgrade your CPAN.pm)" } }, { label => "Build -j3", phase => "make", command => "Build -j3", output => "Output from './Build -j3'\n", exit_value => 1 << 8, result => { grade => "unknown" }, after => { grade => "discard", grade_msg => "-j is not a valid option for Module::Build (upgrade your CPAN.pm)" } }, { label => "makefile out of date", phase => "make", command => "make", output => "blah blah\nMakefile out-of-date with respect to Makefile.PL\nblah blah\n", exit_value => 1 << 8, result => { grade => "unknown" }, after => { grade => "discard", grade_msg => "Makefile out-of-date", } }, ); #--------------------------------------------------------------------------# # plan #--------------------------------------------------------------------------# plan tests => 2 + test_fake_config_plan() + 2 * @cases; #--------------------------------------------------------------------------# # tests #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); require_ok('CPAN::Reporter::History'); test_fake_config(); for my $c ( @cases ) { # create a fake result to force send_duplicates prompt my $dummy_result = CPAN::Reporter::_init_result( $c->{phase}, $mock_dist, $c->{command}, $c->{output}, $c->{exit_value}, ); $dummy_result->{grade} = $c->{result}{grade}; $dummy_result->{grade_msg} = "test message"; CPAN::Reporter::_downgrade_known_causes( $dummy_result ); is( $dummy_result->{grade}, $c->{after}{grade}, "$c->{label}: grade is '$c->{after}{grade}'" ); is( $dummy_result->{grade_msg}, $c->{after}{grade_msg}, "$c->{label}: grade_msg is correct" ); } MockPatchlevel.pm100644000765000024 74014423611161 17662 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/libpackage MockPatchlevel; # With XSConfig is readonly, so workaround that. if ($Config::Config{perl_patchlevel}) { if (exists &Config::KEYS) { # compiled Config *Config_FETCHorig = \&Config::FETCH; no warnings 'redefine'; *Config::FETCH = sub { if ($_[0] and $_[1] eq 'patchlevel') { return ''; } else { return Config_FETCHorig(@_); } } } else { tied(%Config)->{perl_patchlevel} = ''; # uncompiled Config } } 1; GTE.pm100644000765000024 6414423611161 17406 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/perl5lib/Boguspackage Bogus::GTE; $VERSION = 3.14; use strict; 1; LTE.pm100644000765000024 6414423611161 17413 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/perl5lib/Boguspackage Bogus::LTE; $VERSION = 3.14; use strict; 1; portability.t100644000765000024 16314423611161 20075 0ustar00garustaff000000000000CPAN-Reporter-1.2019/xt/authoruse strict; use warnings; use Test::More; use Test::Portability::Files; options(test_one_dot => 0); run_tests(); Reporter000755000765000024 014423611161 16362 5ustar00garustaff000000000000CPAN-Reporter-1.2019/lib/CPANAPI.pm100644000765000024 1147514423611161 17521 0ustar00garustaff000000000000CPAN-Reporter-1.2019/lib/CPAN/Reporteruse strict; # make CPANTS happy package CPAN::Reporter::API; our $VERSION = '1.2019'; 1; # ABSTRACT: Programmer's interface to CPAN::Reporter __END__ =pod =encoding UTF-8 =head1 NAME CPAN::Reporter::API - Programmer's interface to CPAN::Reporter =head1 VERSION version 1.2019 =head1 FUNCTIONS CPAN::Reporter provides only a few public function for use within CPAN.pm. They are not imported during C<<< use >>>. Ordinary users will never need them. =head2 C<<< configure() >>> CPAN::Reporter::configure(); Prompts the user to edit configuration settings stored in the CPAN::Reporter C<<< config.ini >>> file. It will create the configuration file if it does not exist. It is automatically called by CPAN.pm when initializing the 'test_report' option, e.g.: cpan> o conf init test_report =head2 C<<< record_command() >>> ($output, $exit_value) = CPAN::Reporter::record_command( $cmd, $secs ); Takes a command to be executed via system(), but wraps and tees it to show the output to the console, capture the output, and capture the exit code. Returns an array reference of output lines (merged STDOUT and STDERR) and the return value from system(). Note that this is C<<< $? >>>, so the actual exit value of the command will need to be extracted as described in L. If the command matches E\b(?:MakefileEBuild)\.PL\bE, then L is added to C<<< PERL5OPT >>> to force autoflushing of user prompts. If the command includes a pipe character ('E'), only the part of the command prior to the pipe will be wrapped and teed. The pipe will be applied to the execution of the wrapper script. This is essential to capture the exit value of the command and should be otherwise transparent. If a non-zero C<<< $secs >>> argument is provided, the command will be run with a timeout of C<<< $secs >>> (seconds) if the appropriate process management modules are available. On Win32, L must be available; on Unix, L must be available. Otherwise, code will fall-back to running without a timeout. Also, on Win32, the first space-separated element of the command must be absolute, or else ".exe" will be appended and the PATH searched for a matching command. If the attempt to record fails, a warning will be issued and one or more of C<<< $output >>> or C<<< $exit_value >>> will be undefined. =head2 C<<< grade_make() >>> CPAN::Reporter::grade_make( $dist, $command, \@output, $exit); Given a CPAN::Distribution object, the system command used to build the distribution (e.g. "make", "perl Build"), an array of lines of output from the command and the exit value from the command, C<<< grade_make() >>> determines a grade for this stage of distribution installation. If the grade is "pass", C<<< grade_make() >>> does B send a CPAN Testers report for this stage and returns true to signal that the build was successful. Otherwise, a CPAN Testers report is sent and C<<< grade_make() >>> returns false. =head2 C<<< grade_PL() >>> CPAN::Reporter::grade_PL( $dist, $command, \@output, $exit); Given a CPAN::Distribution object, the system command used to run Makefile.PL or Build.PL (e.g. "perl Makefile.PL"), an array of lines of output from the command and the exit value from the command, C<<< grade_PL() >>> determines a grade for this stage of distribution installation. If the grade is "pass", C<<< grade_PL() >>> does B send a CPAN Testers report for this stage and returns true to signal that the Makefile.PL or Build.PL ran successfully. Otherwise, a CPAN Testers report is sent and C<<< grade_PL() >>> returns false. =head2 C<<< grade_test() >>> CPAN::Reporter::grade_test( $dist, $command, \@output, $exit); Given a CPAN::Distribution object, the system command used to run tests (e.g. "make test"), an array of lines of output from testing and the exit value from the system command, C<<< grade_test() >>> determines a grade for distribution tests. A CPAN Testers report is then sent unless specified prerequisites were not satisfied, in which case the report is discarded. This function returns true if the grade is "pass" or "unknown" and returns false, otherwise. =head2 C<<< test() >>> -- DEPRECATED CPAN::Reporter::test( $cpan_dist, $system_command ); This function is maintained for backwards compatibility. It effectively wraps the functionality of C<<< record_command() >>> and C<<< grade_test() >>> into a single function call. It takes a CPAN::Distribution object and the system command to run distribution tests. =head1 SEE ALSO =over =item * L =item * L =item * L =back =head1 AUTHOR David Golden =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2023 by David Golden. This is free software, licensed under: The Apache License, Version 2.0, January 2004 =cut FAQ.pm100644000765000024 1040014423611161 17502 0ustar00garustaff000000000000CPAN-Reporter-1.2019/lib/CPAN/Reporteruse strict; # make CPANTS happy package CPAN::Reporter::FAQ; our $VERSION = '1.2019'; 1; # ABSTRACT: Answers and tips for using CPAN::Reporter __END__ =pod =encoding UTF-8 =head1 NAME CPAN::Reporter::FAQ - Answers and tips for using CPAN::Reporter =head1 VERSION version 1.2019 =head1 REPORT GRADES =head2 Why did I receive a report? Historically, CPAN Testers was designed to have each tester send a copy of reports to authors. This philosophy changed in September 2008 and CPAN Testers tools were updated to no longer copy authors, but some testers may still be using an older version. =head2 Why was a report sent if a prerequisite is missing? As of CPAN::Reporter 0.46, FAIL and UNKNOWN reports with unsatisfied prerequisites are discarded. Earlier versions may have sent these reports out by mistake as either an NA or UNKNOWN report. PASS reports are not discarded because it may be useful to know when tests passed despite a missing prerequisite. NA reports are sent because information about the lack of support for a platform is relevant regardless of prerequisites. =head1 SENDING REPORTS =head2 Why did I get an error sending a test report? Historically, test reports were sent via ordinary email. The most common reason for errors sending a report back then was that many Internet Service Providers (ISP's) would block outbound SMTP (email) connections as part of their efforts to fight spam. Since 2010, test reports are sent to the CPAN Testers Metabase over HTTPS. The most common reason for failures are systems which upgraded CPAN::Reporter but are still configured to use the deprecated and unsupported email system instead of Metabase for transport. If you are unsure which transport mechanism you're using, look for the C<<< transport >>> rule in the C<<< .cpanreporter/config.ini >>> file, in the user's home directory. See L for details on how to set the C<<< transport >>> option for Metabase. Other errors could be caused by the absence of the C<<< .cpanreporter/metabase_id.json >>> file in the user's home directory. This file should be manually created prior to sending any reports, via the C<<< metabase-profile >>> program. Simply run it and fill in the information accordingly, and it will create the C<<< metabase_id.json >>> file for you. Move that file to your C<<< .cpanreporter >>> directory and you're all set. If you experience intermittent network issues, you can set the 'retry_submission' option to make a second attempt at sending the report a few seconds later, in case the first one fails. This could be useful for extremely slow connections. Finally, lack of Internet connection or firewall filtering will prevent the report from reaching the CPAN Testers servers. If you are experiencing HTTPS issues or messages complaining about SSL modules, try installing the L module and trying again. If all fails, you may still change the transport uri to use HTTP instead of HTTPS, though this is I recommended. =head2 Why didn't my test report show up on CPAN Testers? There is a delay between the time reports are sent to the Metabase and when they they appear on the CPAN Testers website. There is a further delay before summary statistics appear on search.cpan.org. If your reports do not appear after 24 hours, please contact the cpan-testers-discuss email list (L) or join the C<<< #cpantesters-discuss >>> IRC channel on C<<< irc.perl.org >>>. =head1 CPAN TESTERS =head2 Where can I find out more about CPAN Testers? A good place to start is the CPAN Testers Wiki: L =head2 Where can I find statistics about reports sent to CPAN Testers? CPAN Testers statistics are compiled at L =head2 How do I make sure I get credit for my test reports? To get credit in the statistics, use the same Metabase profile file and the same email address wherever you run tests. =head1 SEE ALSO =over =item * L =item * L =item * L =back =head1 AUTHOR David Golden =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2023 by David Golden. This is free software, licensed under: The Apache License, Version 2.0, January 2004 =cut 15_option_validation.t100644000765000024 347214423611161 20116 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use Frontend; use Helper; use File::Spec; my @cases = ( { label => "skipfile (exists)", option => "cc_skipfile", input => File::Spec->rel2abs("Changes"), output => File::Spec->rel2abs("Changes"), }, { label => "skipfile (missing)", option => "cc_skipfile", input => "afdadfasdfasdf", output => undef, }, { label => "command_timeout (positive)", option => "command_timeout", input => 10, output => 10, }, { label => "command_timeout (negative)", option => "command_timeout", input => -10, output => undef, }, { label => "command_timeout (zero)", option => "command_timeout", input => 0, output => 0, }, { label => "command_timeout (empty)", option => "command_timeout", input => q{}, output => undef, }, { label => "command_timeout (undef)", option => "command_timeout", input => undef, output => undef, }, { label => "command_timeout (alpha)", option => "command_timeout", input => "abcd", output => undef, }, ); plan tests => 1 + 1 * @cases; #--------------------------------------------------------------------------# # Begin tests #--------------------------------------------------------------------------# require_ok( "CPAN::Reporter::Config" ); for my $c ( @cases ) { my ($got); $got = CPAN::Reporter::Config::_validate( $c->{option}, $c->{input} ); is( $got, $c->{output}, $c->{label} ); } 31_PL_report_discard.t100644000765000024 436214423611161 17770 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use MockCPANDist; use Frontend; use Helper; my @test_distros = ( # discards { name => 'PL-PrereqMiss', prereq => { 'requires' => {'Unavailable::Module' => 0} }, eumm_success => 0, eumm_grade => "discard", mb_success => 0, mb_grade => "discard", }, { name => 'PL-PrereqMissOK', prereq => { 'requires' => {'Unavailable::Module' => 0} }, eumm_success => 1, eumm_grade => "pass", mb_success => 1, mb_grade => "pass", }, { name => 'PL-PrereqFail', prereq => { 'requires' => { 'File::Spec' => 99999.9 } }, eumm_success => 0, eumm_grade => "discard", mb_success => 0, mb_grade => "discard", }, { name => 'PL-NoMakefileOrBuild', prereq => {}, eumm_success => 0, eumm_grade => "discard", mb_success => 0, mb_grade => "discard", }, { name => 'PL-ConfigRequires', prereq => {}, eumm_success => 0, eumm_grade => "discard", mb_success => 0, mb_grade => "discard", }, { name => 'PL-ConfigRequiresError', prereq => {}, eumm_success => 0, eumm_grade => "unknown", mb_success => 0, mb_grade => "unknown", }, ); plan tests => 1 + test_fake_config_plan() + test_grade_PL_plan() * @test_distros; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# #--------------------------------------------------------------------------# # tests #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); test_fake_config(); for my $case ( @test_distros ) { my $mock_dist = MockCPANDist->new( pretty_id => "JOHNQP/Bogus-Module-1.23.tar.gz", prereq_pm => $case->{prereq}, author_id => "JOHNQP", author_fullname => "John Q. Public", ); test_grade_PL( $case, $mock_dist ); } 54_test_report_split.t100644000765000024 403014423611161 20153 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use MockCPANDist; use Helper; use Frontend; my @test_distros = ( # split pass/fail { name => 't-test.pl-Pass-NoOutput-OK', eumm_success => 1, eumm_grade => "pass", eumm_msg => "'make test' no errors", mb_success => 0, mb_grade => "fail", mb_msg => "One or more tests failed", }, { name => 't-Recurse-Fail-t', eumm_success => 0, eumm_grade => "fail", eumm_msg => "'make test' error detected", mb_success => 1, mb_grade => "unknown", mb_msg => "No tests provided", }, { name => 't-Recurse-Fail-test.pl', eumm_success => 0, eumm_grade => "fail", eumm_msg => "'make test' error detected", mb_success => 1, mb_grade => "unknown", mb_msg => "No tests provided", }, { name => 'NoTestTarget', eumm_success => 1, eumm_grade => "unknown", eumm_msg => "No make test target", mb_success => 1, mb_grade => "unknown", mb_msg => "No tests provided", }, ); plan tests => 1 + test_fake_config_plan() + test_grade_test_plan() * @test_distros; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my $mock_dist = MockCPANDist->new( pretty_id => "JOHNQP/Bogus-Module-1.23.tar.gz", prereq_pm => { requires => { 'File::Spec' => 0 }, }, author_id => "JOHNQP", author_fullname => "John Q. Public", ); #--------------------------------------------------------------------------# # tests #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); test_fake_config(); for my $case ( @test_distros ) { test_grade_test( $case, $mock_dist ); } 62_duplicate_reports.t100644000765000024 1570314423611161 20146 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use MockCPANDist; use Helper; use Frontend; use Probe::Perl; #--------------------------------------------------------------------------# # We need Config to be writeable, so modify the tied hash #--------------------------------------------------------------------------# use Config; BEGIN { BEGIN { if (not $] < 5.006 ) { warnings->unimport('redefine') } } *Config::STORE = sub { $_[0]->{$_[1]} = $_[2] } } #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my $make = $Config{make}; my $perl = Probe::Perl->find_perl_interpreter(); $perl = qq{"$perl"}; my %mock_dist_info = ( prereq_pm => { requires => { 'File::Spec' => 0 }, }, author_id => "JOHNQP", author_fullname => "John Q. Public", ); my @cases = ( { label => "first PL failure", name => "PL-Fail", version => 1.23, grade => "unknown", phase => "PL", command => "$perl Makefile.PL", send_dup => "no", is_dup => 0, }, { label => "second PL failure", name => "PL-Fail", version => 1.23, grade => "unknown", phase => "PL", command => "$perl Makefile.PL", send_dup => "no", is_dup => 1, }, { label => "first PL unsupported", name => "PL-NoSupport", version => 1.23, grade => "na", phase => "PL", command => "$perl Makefile.PL", send_dup => "no", is_dup => 0, }, { label => "first make failure", name => "make-Fail", version => 1.23, grade => "unknown", phase => "make", command => "$make", send_dup => "no", is_dup => 0, }, { label => "second make failure", name => "make-Fail", version => 1.23, grade => "unknown", phase => "make", command => "$make", send_dup => "no", is_dup => 1, }, { label => "first test unknown", name => "NoTestFiles", version => 1.23, grade => "unknown", phase => "test", command => "$make test", send_dup => "no", is_dup => 0, }, { label => "first test failure", name => "t-Fail", version => 1.23, grade => "fail", phase => "test", command => "$make test", send_dup => "no", is_dup => 0, }, { label => "second test failure (but send dup)", name => "t-Fail", version => 1.23, grade => "fail", phase => "test", command => "$make test", send_dup => "yes", is_dup => 1, }, { label => "first discard", name => 't-PrereqMiss', version => 9.11, prereq => { 'requires' => { 'Bogus::Module::Doesnt::Exist' => 0 } }, grade => "discard", phase => "test", command => "$make test", send_dup => "no", is_dup => 0, }, { label => "third test failure (new version)", name => "t-Fail", version => 1.24, grade => "fail", phase => "test", command => "$make test", send_dup => "no", is_dup => 0, }, { label => "second discard", name => 't-PrereqMiss', version => 9.11, prereq => { 'requires' => { 'Bogus::Module::Doesnt::Exist' => 0 } }, grade => "discard", phase => "test", command => "$make test", send_dup => "no", is_dup => 1, }, ); my $expected_history_lines = 1; # opening comment line for my $c ( @cases ) { $expected_history_lines++ if not $c->{is_dup} } plan tests => 5 + $expected_history_lines + @cases * ( 3 + test_fake_config_plan() + test_dispatch_plan() ); #--------------------------------------------------------------------------# # subs #--------------------------------------------------------------------------# sub history_format { my ($case) = @_; my ($phase, $grade, $dist) = @{$case}{qw/phase grade dist/}; $grade = uc $grade; my $perl_ver = "perl-" . CPAN::Reporter::History::_perl_version(); $perl_ver .= " patch $Config{perl_patchlevel}" if $Config{perl_patchlevel}; my $arch = CPAN::Reporter::History::_format_archname(); my $os = $Config{osvers}; my $dist_name = $dist->base_id; return "$phase $grade $dist_name ($perl_ver) $arch $os\n"; } #--------------------------------------------------------------------------# # tests #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); require_ok('CPAN::Reporter::History'); my @results; for my $case ( @cases ) { # localize Config in same scope if there is a patchlevel local $Config{perl_patchlevel} = $case->{patch} if $case->{patch}; # and set it once localized test_fake_config( send_duplicates => $case->{send_dup} ); $case->{dist} = MockCPANDist->new( %mock_dist_info, pretty_id => "JOHNQP/Bogus-Module-$case->{version}.tar.gz", ); $case->{dist}{prereq_pm} = $case->{prereq} if $case->{prereq}; test_dispatch( $case, will_send => ($case->{grade} ne 'discard') && (! $case->{is_dup}) || ( $case->{send_dup} eq 'yes' ) ); if ( not $case->{is_dup} ) { push @results, history_format($case); } my @found; ok( @found = CPAN::Reporter::History::have_tested( dist => $case->{dist}->base_id ), "$case->{label}: have_tested( base_id ) is true" ); is( ref($found[0]), 'HASH', "$case->{label}: have_tested returns AoH" ); is( $found[0]{dist}, $case->{dist}->base_id, "$case->{label}: have_tested struct has dist name" ); } #--------------------------------------------------------------------------# # have_tested fails #--------------------------------------------------------------------------# ok( ! CPAN::Reporter::History::have_tested( dist => "AADFASDFADSFASD" ), "have_tested() returns false if not found" ); #--------------------------------------------------------------------------# # Check history file format #--------------------------------------------------------------------------# my $history_fh = CPAN::Reporter::History::_open_history_file('<'); ok( $history_fh, "found history file" ); my @history = <$history_fh>; is( scalar @history, $expected_history_lines, "history file length is $expected_history_lines" ); is( shift @history, "# Generated by CPAN::Reporter $CPAN::Reporter::History::VERSION\n", "history starts with version comment" ); for my $i ( 0 .. $#results ) { is( $history[$i], $results[$i], "history matched results[$i]" ); } pod-coverage.t100644000765000024 36514423611161 20112 0ustar00garustaff000000000000CPAN-Reporter-1.2019/xt/author#!perl # This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests. use strict; use warnings; use Test::Pod::Coverage 1.08; use Pod::Coverage::TrustPod; all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' }); test-version.t100644000765000024 63714423611161 20203 0ustar00garustaff000000000000CPAN-Reporter-1.2019/xt/authoruse strict; use warnings; use Test::More; # generated by Dist::Zilla::Plugin::Test::Version 1.09 use Test::Version; my @imports = qw( version_all_ok ); my $params = { is_strict => 0, has_version => 1, multiple => 0, }; push @imports, $params if version->parse( $Test::Version::VERSION ) >= version->parse('1.002'); Test::Version->import(@imports); version_all_ok; done_testing; NoTestDir000755000765000024 014423611161 16457 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 34514423611161 20075 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/NoTestDiruse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; Build.PL100644000765000024 64314423611161 20011 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-Failuse strict; use Module::Build; my $class = Module::Build->subclass( class => "Module::Build::WikiDoc", code => <<'SUBCLASS', ); sub ACTION_build { die "Build failure"; } SUBCLASS $class->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', PL_files => { 'Die.PL' => 'impossible_file.pm' }, )->create_build_script; t-BailOut000755000765000024 014423611161 16404 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 34514423611161 20022 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-BailOutuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; Makefile.PL100644000765000024 52014423611161 20007 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Fail# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; Makefile.PL100644000765000024 52014423611161 20011 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Hang# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; Makefile.PL100644000765000024 52014423611161 20042 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Pass# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; 12_toolchain_versions.t100644000765000024 307714423611161 20302 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use MockCPANDist; use Helper; use Frontend; use Config; my @toolchain= qw( CPAN Cwd ExtUtils::CBuilder ExtUtils::Command ExtUtils::Install ExtUtils::MakeMaker ExtUtils::Manifest ExtUtils::ParseXS File::Spec Module::Build Module::Signature Test::Harness Test::More version ); # paths # * cwd # * compiler # * $Config{make} # special handling # * umask # * locale -- how do I determine this? # * compiler tools versions plan tests => 1 + test_fake_config_plan() + 2 * @toolchain ; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my ($got, $expect); #--------------------------------------------------------------------------# # Begin tests #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); test_fake_config(); $got = CPAN::Reporter::_toolchain_report(); $got =~ s{[^\n]+?\n[^\n]+?\n}{}; # eat headers my %parse = split " ", $got; my $modules = CPAN::Reporter::_version_finder( map { $_ => 0 } @toolchain ); for my $var ( sort @toolchain ) { my $mod_name = quotemeta($var); ok( exists $parse{$var}, "found toolchain module entry for '$var'" ); is( $parse{$var}, $modules->{$var}{have}, "version of '$var' is correct" ); } 63_config_send_report.t100644000765000024 636714423611161 20256 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use MockCPANDist; use Helper; use Frontend; use Config; use Probe::Perl; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my $make = $Config{make}; my $perl = Probe::Perl->find_perl_interpreter(); $perl = qq{"$perl"}; my $mock_dist = MockCPANDist->new( pretty_id => "JOHNQP/Bogus-Module-1.23.tar.gz", prereq_pm => { requires => { 'File::Spec' => 0 }, }, author_id => "JOHNQP", author_fullname => "John Q. Public", ); my @cases = ( { label => "send_PL_report 'no'", name => "PL-Fail", version => 1.23, grade => "fail", phase => "PL", command => "$perl Makefile.PL", will_send => 0, options => { send_report => "yes", send_PL_report => "no", }, }, { label => "send_make_report 'no'", label => "first make failure", name => "make-Fail", version => 1.23, grade => "fail", phase => "make", command => "$make", will_send => 0, options => { send_report => "yes", send_make_report => "no", }, }, { label => "send_test_report 'no'", name => "t-Fail", grade => "fail", phase => "test", command => "$make test", will_send => 0, options => { send_report => "yes", send_test_report => "no", }, }, { label => "send_PL_report 'yes'", name => "PL-Fail", version => 1.23, grade => "fail", phase => "PL", command => "$perl Makefile.PL", will_send => 1, options => { send_report => "no", send_PL_report => "yes", }, }, { label => "send_make_report 'yes'", label => "first make failure", name => "make-Fail", version => 1.23, grade => "fail", phase => "make", command => "$make", will_send => 1, options => { send_report => "no", send_make_report => "yes", }, }, { label => "send_test_report 'yes'", name => "t-Fail", grade => "fail", phase => "test", command => "$make test", will_send => 1, options => { send_report => "no", send_test_report => "yes", }, }, ); my $expected_history_lines = 1; # opening comment line for my $c ( @cases ) { $expected_history_lines++ if not $c->{is_dup} } plan tests => 1 + @cases * ( test_fake_config_plan() + test_dispatch_plan() ); #--------------------------------------------------------------------------# # tests #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); my @results; for my $case ( @cases ) { $case->{dist} = $mock_dist; test_fake_config( %{$case->{options}} ); test_dispatch( $case, will_send => $case->{will_send}, ); } 70_darwin_move_config.t100644000765000024 524014423611161 20227 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use Config::Tiny; use Capture::Tiny qw/capture/; use File::Spec; use File::Temp qw/tempdir/; use File::Path qw/mkpath rmtree/; use lib 't/lib'; use Frontend; plan tests => 9; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my $temp_home = File::Spec->catdir( File::Spec->tmpdir(), $$ ); my $old_home = File::Spec->rel2abs( $temp_home ); my $old_config_dir = File::Spec->catdir( $old_home, ".cpanreporter" ); my $old_config_file = File::Spec->catfile( $old_config_dir, "config.ini" ); my $new_home = $old_home . "-new"; my $new_config_dir = File::Spec->catdir( $new_home, ".cpanreporter" ); my $new_config_file = File::Spec->catfile( $new_config_dir, "config.ini" ); my ($rc, $stdout, $stderr); my $email_line = "email_address = johndoe\@doe.org\n"; mkpath $old_config_dir; open FILE, ">$old_config_file" or die $!; print FILE $email_line; close FILE; #--------------------------------------------------------------------------# # Mocking -- override support/system functions #--------------------------------------------------------------------------# BEGIN { $INC{"File/HomeDir.pm"} = 1; # fake load } package File::HomeDir; our $VERSION = 999; sub my_documents { return $old_home }; sub my_home { return $new_home }; package main; #--------------------------------------------------------------------------# # Make sure nothing happens when OS is not Darwin { local $^O = 'unknown'; require_ok('CPAN::Reporter::Config'); ok( -d $old_config_dir, "non-darwin logic: old config dir still in place" ); ok( ! -d $new_config_dir, "non-darwin logic: new config dir not created" ); } # Reset %INC to get CPAN::Reporter to load again delete $INC{'CPAN/Reporter/Config.pm'}; delete ${*CPAN::Reporter::Config}{$_} for ( keys %{*CPAN::Reporter::Config} ); { local $^O = 'darwin'; capture { require_ok( "CPAN::Reporter::Config" ); }; ok( $INC{'CPAN/Reporter/Config.pm'}, "CPAN::Reporter::Config reloaded" ); ok( ! -d $old_config_dir, "darwin logic: old config-dir removed" ); ok( -d $new_config_dir, "darwin logic: new config-dir created" ); open CONFIG, "<$new_config_file" or die $!; is( scalar , $email_line, "darwin logic: new config contents correct" ); close CONFIG; } # cleanup rmtree $new_home; rmtree $old_home; ok( ( ! -d $old_home) && ( ! -d $new_home ), "cleaned up temp directories" ); reports-sent.db100644000765000024 54414423611161 20334 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/history# Generated by CPAN::Reporter VERSION test PASS File-Marker-0.12 (perl-5.8.8) i686-linux-64int-ld 2.6.17-10-generic test FAIL DateTime-0.38 (perl-5.8.0) i686-linux-64int-ld 2.6.17-10-generic test NA DateTime-0.38 (perl-5.00504) i686-linux-64int-ld 2.6.17-10-generic test PASS File-Marker-0.12 (perl-5.9.5 patch 31706) i686-linux-64int-ld 2.6.20-16-generic Found.pm100644000765000024 6614423611161 20044 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/perl5lib/Boguspackage Bogus::Found; $VERSION = 3.14; use strict; 1; Makefile.PL100644000765000024 56314423611161 20066 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-Fail# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; die "Makefile.PL should die!\n"; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; Makefile.PL100644000765000024 53414423611161 20066 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-Hanguse ExtUtils::MakeMaker; # just spin and be interrupted by command_timeout sleep 30; die "Fail, fail, fail!"; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; t000755000765000024 014423611161 16163 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Fail01_Bogus.t100644000765000024 14214423611161 20044 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Fail/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; fail( "Failed this test" ); t000755000765000024 014423611161 16165 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Hang01_Bogus.t100644000765000024 43614423611161 20054 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Hang/t# Bogus::Pass tests use strict; use Test::More; plan tests => 2 ; pass( "Passed this test" ); # just spin and be interrupted by command_timeout my $now = time; 1 while ( time - $now < 40 ); die "!!! TIMER DIDNT TIMEOUT -- SHOULDNT BE HERE !!!"; pass( "Won't reach this test" ); t-NoOutput000755000765000024 014423611161 16642 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 34514423611161 20260 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-NoOutputuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; t000755000765000024 014423611161 16216 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Pass01_Bogus.t100644000765000024 14214423611161 20077 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Pass/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); 41_make_report_discard.t100644000765000024 323014423611161 20364 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use MockCPANDist; use Frontend; use Helper; my @test_distros = ( # discards { name => 'make-PrereqMiss', prereq => { 'requires' => {'Unavailable::Module' => 0} }, eumm_success => 0, eumm_grade => "discard", eumm_msg => "Prerequisite missing", mb_success => 0, mb_grade => "discard", mb_msg => "Prerequisite missing", }, { name => 'make-PrereqFail', prereq => { 'requires' => {'File::Spec' => 99999.9} }, eumm_success => 0, eumm_grade => "discard", eumm_msg => "Prerequisite version too low", mb_success => 0, mb_grade => "discard", mb_msg => "Prerequisite version too low", }, ); plan tests => 1 + test_fake_config_plan() + test_grade_make_plan() * @test_distros; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# #--------------------------------------------------------------------------# # tests #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); test_fake_config(); for my $case ( @test_distros ) { my $mock_dist = MockCPANDist->new( pretty_id => "JOHNQP/Bogus-Module-1.23.tar.gz", prereq_pm => $case->{prereq}, author_id => "JOHNQP", author_fullname => "John Q. Public", ); test_grade_make( $case, $mock_dist ); } 52_test_report_unknown.t100644000765000024 277314423611161 20531 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use MockCPANDist; use Helper; use Frontend; my @test_distros = ( # unknown { name => 'NoTestDir', eumm_success => 1, eumm_grade => "unknown", eumm_msg => "No tests provided", mb_success => 1, mb_grade => "unknown", mb_msg => "No tests provided", }, { name => 'NoTestFiles', eumm_success => 1, eumm_grade => "unknown", eumm_msg => "No tests were run", mb_success => 1, mb_grade => "unknown", mb_msg => "No tests provided", }, ); plan tests => 1 + test_fake_config_plan() + test_grade_test_plan() * @test_distros; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my $mock_dist = MockCPANDist->new( pretty_id => "JOHNQP/Bogus-Module-1.23.tar.gz", prereq_pm => { requires => { 'File::Spec' => 0 }, }, author_id => "JOHNQP", author_fullname => "John Q. Public", ); #--------------------------------------------------------------------------# # tests #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); test_fake_config(); for my $case ( @test_distros ) { test_grade_test( $case, $mock_dist ); } 55_test_report_discard.t100644000765000024 665014423611161 20444 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use MockCPANDist; use Frontend; use Helper; use Capture::Tiny qw/capture/; my @test_distros = ( { name => 't-PrereqMiss', prereq => { 'requires' => { 'Bogus::Module::Doesnt::Exist' => 0 } }, eumm_success => 0, eumm_grade => "discard", eumm_msg => "Prerequisite missing", mb_success => 0, mb_grade => "discard", mb_msg => "Prerequisite missing", }, { name => 't-NoTestsButPrereqMiss', prereq => { 'requires' => { 'Bogus::Module::Doesnt::Exist' => 0 } }, eumm_success => 0, eumm_grade => "discard", eumm_msg => "Prerequisite missing", mb_success => 0, mb_grade => "discard", mb_msg => "Prerequisite missing", }, { name => 'test.pl-PrereqMiss', prereq => { 'requires' => { 'Bogus::Module::Doesnt::Exist' => 0 } }, eumm_success => 0, eumm_grade => "discard", eumm_msg => "Prerequisite missing", mb_success => 0, mb_grade => "discard", mb_msg => "Prerequisite missing", }, { name => 't-PrereqFail', prereq => { 'requires' => { 'File::Spec' => 99999.9 } }, eumm_success => 0, eumm_grade => "discard", eumm_msg => "Prerequisite version too low", mb_success => 0, mb_grade => "discard", mb_msg => "Prerequisite version too low", }, { name => 'test.pl-PrereqFail', prereq => { 'requires' => { 'File::Spec' => 99999.9 } }, eumm_success => 0, eumm_grade => "discard", eumm_msg => "Prerequisite version too low", mb_success => 0, mb_grade => "discard", mb_msg => "Prerequisite version too low", }, { name => 't-Harness-Fail', prereq => {}, eumm_success => 0, eumm_grade => "discard", eumm_msg => "Test harness failure", mb_success => 0, mb_grade => "discard", mb_msg => "Test harness failure", }, ); plan tests => 4 + test_fake_config_plan() + test_grade_test_plan() * @test_distros; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# #--------------------------------------------------------------------------# # tests #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); test_fake_config(); for my $case ( @test_distros ) { my $mock_dist = MockCPANDist->new( pretty_id => "JOHNQP/Bogus-Module-1.23.tar.gz", prereq_pm => $case->{prereq}, author_id => "JOHNQP", author_fullname => "John Q. Public", ); test_grade_test( $case, $mock_dist ); } # Perl6 should skip { my $mock_dist = MockCPANDist->new( pretty_id => "JOHNQP/Perl6/Bogus-Module-1.23.tar.gz", prereq_pm => {}, author_id => "JOHNQP", author_fullname => "John Q. Public", ); for my $name (qw/grade_PL grade_make grade_test/) { my $fcn = CPAN::Reporter->can($name); my $output; capture { $output = $fcn->( $mock_dist, 'command', ['some output'], 1 ) }; is( $output, undef, "$name skips Perl6" ); } } Broken.pm100644000765000024 12414423611161 20224 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/perl5lib/Boguspackage Bogus::Broken; $VERSION = 3.14; use strict; use FuddleDuddleCantFindMe; 1; Shadow.pm100644000765000024 6714423611161 20217 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/perl5lib/Boguspackage Bogus::Shadow; $VERSION = 3.14; use strict; 1; TooOld.pm100644000765000024 6714423611161 20172 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/perl5lib/Boguspackage Bogus::TooOld; $VERSION = 0.01; use strict; 1; NoTestFiles000755000765000024 014423611161 17003 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 34514423611161 20421 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/NoTestFilesuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; t000755000765000024 014423611161 17246 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/NoTestFilesREADME100644000765000024 4614423611161 20226 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/NoTestFiles/tThis directory is intentionally blank t000755000765000024 014423611161 16233 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-Fail01_Bogus.t100644000765000024 14214423611161 20114 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-Fail/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); t000755000765000024 014423611161 16235 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-Hang01_Bogus.t100644000765000024 14214423611161 20116 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-Hang/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); t-NoSupport000755000765000024 014423611161 17016 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 34514423611161 20434 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-NoSupportuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; test.pl-Fail000755000765000024 014423611161 17046 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpustest.pl100644000765000024 14214423611161 20477 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-Fail# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; fail( "Failed this test" ); test.pl-Pass000755000765000024 014423611161 17101 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpustest.pl100644000765000024 14214423611161 20532 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-Pass# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); Config.pm100644000765000024 7561314423611161 20321 0ustar00garustaff000000000000CPAN-Reporter-1.2019/lib/CPAN/Reporteruse strict; package CPAN::Reporter::Config; our $VERSION = '1.2019'; use Config::Tiny 2.08 (); use File::Glob (); use File::HomeDir 0.58 (); use File::Path qw/mkpath/; use File::Spec 3.19 (); use IPC::Cmd 0.76 (); use IO::File (); use CPAN 1.9301 (); # for printing warnings #--------------------------------------------------------------------------# # Back-compatibility checks -- just once per load #--------------------------------------------------------------------------# # 0.28_51 changed Mac OS X config file location -- if old directory is found, # move it to the new location if ( $^O eq 'darwin' ) { my $old = File::Spec->catdir(File::HomeDir->my_documents,".cpanreporter"); my $new = File::Spec->catdir(File::HomeDir->my_home,".cpanreporter"); if ( ( -d $old ) && (! -d $new ) ) { $CPAN::Frontend->mywarn( << "HERE"); CPAN::Reporter: since CPAN::Reporter 0.28_51, the Mac OSX config directory has changed. Old: $old New: $new Your existing configuration file will be moved automatically. HERE mkpath($new); my $OLD_CONFIG = IO::File->new( File::Spec->catfile($old, "config.ini"), "<" ) or die $!; my $NEW_CONFIG = IO::File->new( File::Spec->catfile($new, "config.ini"), ">" ) or die $!; $NEW_CONFIG->print( do { local $/; <$OLD_CONFIG> } ); $OLD_CONFIG->close; $NEW_CONFIG->close; unlink File::Spec->catfile($old, "config.ini") or die $!; rmdir($old) or die $!; } } #--------------------------------------------------------------------------# # Public #--------------------------------------------------------------------------# sub _configure { my $config_dir = _get_config_dir(); my $config_file = _get_config_file(); mkpath $config_dir if ! -d $config_dir; if ( ! -d $config_dir ) { $CPAN::Frontend->myprint( "\nCPAN::Reporter: couldn't create configuration directory '$config_dir': $!" ); return; } my $config; my $existing_options; # explain grade:action pairs $CPAN::Frontend->myprint( _grade_action_prompt() ); # read or create if ( -f $config_file ) { $CPAN::Frontend->myprint( "\nCPAN::Reporter: found your CPAN::Reporter config file at:\n$config_file\n" ); $config = _open_config_file(); # if we can't read it, bail out if ( ! $config ) { $CPAN::Frontend->mywarn("\n CPAN::Reporter: configuration will not be changed\n"); return; } # clone what's in the config file $existing_options = { %{$config->{_}} } if $config; $CPAN::Frontend->myprint( "\nCPAN::Reporter: Updating your CPAN::Reporter configuration settings:\n" ); } else { $CPAN::Frontend->myprint( "\nCPAN::Reporter: no config file found; creating a new one.\n" ); $config = Config::Tiny->new(); } my %spec = _config_spec(); for my $k ( _config_order() ) { my $option_data = $spec{$k}; $CPAN::Frontend->myprint( "\n" . $option_data->{info}. "\n"); # options with defaults are mandatory if ( defined $option_data->{default} ) { # if we have a default, always show as a sane recommendation if ( length $option_data->{default} ) { $CPAN::Frontend->myprint( "(Recommended: '$option_data->{default}')\n\n" ); } # repeat until validated PROMPT: while ( defined ( my $answer = CPAN::Shell::colorable_makemaker_prompt( "$k?", $existing_options->{$k} || $option_data->{default} ) )) { if ( ! $option_data->{validate} || $option_data->{validate}->($k, $answer, $config->{_}) ) { $config->{_}{$k} = $answer; last PROMPT; } } } else { # only initialize options without default if # answer matches non white space and validates, # otherwise reset it my $answer = CPAN::Shell::colorable_makemaker_prompt( "$k?", $existing_options->{$k} || q{} ); if ( $answer =~ /\S/ ) { $config->{_}{$k} = $answer; } else { delete $config->{_}{$k}; } } # delete existing as we proceed so we know what's left delete $existing_options->{$k}; } # initialize remaining existing options $CPAN::Frontend->myprint( "\nYour CPAN::Reporter config file also contains these advanced " . "options:\n\n") if keys %$existing_options; for my $k ( keys %$existing_options ) { $config->{_}{$k} = CPAN::Shell::colorable_makemaker_prompt( "$k?", $existing_options->{$k} ); } $CPAN::Frontend->myprint( "\nCPAN::Reporter: writing config file to '$config_file'.\n" ); if ( $config->write( $config_file ) ) { return $config->{_}; } else { $CPAN::Frontend->mywarn( "\nCPAN::Reporter: error writing config file to '$config_file':\n" . Config::Tiny->errstr(). "\n"); return; } } #--------------------------------------------------------------------------# # Private #--------------------------------------------------------------------------# #--------------------------------------------------------------------------# # _config_order -- determines order of interactive config. Only items # in interactive config will be written to a starter config file #--------------------------------------------------------------------------# sub _config_order { return qw( email_from edit_report send_report transport ); } #--------------------------------------------------------------------------# # _config_spec -- returns configuration options information # # Keys include # default -- recommended value, used in prompts and as a fallback # if an options is not set; mandatory if defined # prompt -- short prompt for EU::MM prompting # info -- long description shown before prompting # validate -- CODE ref; return normalized option or undef if invalid #--------------------------------------------------------------------------# my %option_specs = ( email_from => { default => '', prompt => 'What email address will be used to reference your reports?', info => <<'HERE', CPAN::Reporter requires a valid email address to identify senders in the body of a test report. Please use a standard email format like: "John Doe" HERE }, smtp_server => { default => undef, # (deprecated) prompt => "[DEPRECATED] It's safe to remove this from your config file.", }, edit_report => { default => 'default:ask/no pass/na:no', prompt => "Do you want to review or edit the test report?", validate => \&_validate_grade_action_pair, info => <<'HERE', Before test reports are sent, you may want to review or edit the test report and add additional comments about the result or about your system or Perl configuration. By default, CPAN::Reporter will ask after each report is generated whether or not you would like to edit the report. This option takes "grade:action" pairs. HERE }, send_report => { default => 'default:ask/yes pass/na:yes', prompt => "Do you want to send the report?", validate => \&_validate_grade_action_pair, info => <<'HERE', By default, CPAN::Reporter will prompt you for confirmation that the test report should be sent before actually doing it. This gives the opportunity to skip sending particular reports if you need to (e.g. if you caused the failure). This option takes "grade:action" pairs. HERE }, transport => { default => 'Metabase uri https://metabase.cpantesters.org/api/v1/ id_file metabase_id.json', prompt => 'Which transport system will be used to transmit the reports?', validate => \&_validate_transport, info => <<'HERE', CPAN::Reporter sends your reports over HTTPS using Metabase. This option lets you set a different uri, transport mechanism and metabase profile path. If you are receiving HTTPS errors, you may change the uri to use plain HTTP, though this is not recommended. Unless you know what you're doing, just accept the default value. HERE }, send_duplicates => { default => 'default:no', prompt => "This report is identical to a previous one. Send it anyway?", validate => \&_validate_grade_action_pair, info => <<'HERE', CPAN::Reporter records tests grades for each distribution, version and platform. By default, duplicates of previous results will not be sent at all, regardless of the value of the "send_report" option. This option takes "grade:action" pairs. HERE }, send_PL_report => { prompt => "Do you want to send the PL report?", default => undef, validate => \&_validate_grade_action_pair, }, send_make_report => { prompt => "Do you want to send the make/Build report?", default => undef, validate => \&_validate_grade_action_pair, }, send_test_report => { prompt => "Do you want to send the test report?", default => undef, validate => \&_validate_grade_action_pair, }, send_skipfile => { prompt => "What file has patterns for things that shouldn't be reported?", default => undef, validate => \&_validate_skipfile, }, cc_skipfile => { prompt => "What file has patterns for things that shouldn't CC to authors?", default => undef, validate => \&_validate_skipfile, }, command_timeout => { prompt => "If no timeout is set by CPAN, halt system commands after how many seconds?", default => undef, validate => \&_validate_seconds, }, email_to => { default => undef, }, editor => { default => undef, }, debug => { default => undef, }, retry_submission => { default => undef, }, '_store_problems_in_dir' => { #experimental default => undef, }, '_problem_log' => { #experimental default => undef, }, ); sub _config_spec { return %option_specs } #--------------------------------------------------------------------------# # _generate_profile # # Run 'metabase-profile' in the .cpanreporter directory #--------------------------------------------------------------------------# sub _generate_profile { my ($id_file, $config) = @_; my $cmd = IPC::Cmd::can_run('metabase-profile'); return unless $cmd; # XXX this is an evil assumption about email addresses, but # might do for simple cases that users might actually provide my @opts = ("--output" => $id_file); my $email = $config->{email_from}; if ($email =~ /\A(.+)\s+<([^>]+)>\z/ ) { push @opts, "--email" => $2; my $name = $1; $name =~ s/\A["'](.*)["']\z/$1/; push ( @opts, "--name" => $1) if length $name; } else { push @opts, "--email" => $email; } # XXX profile 'secret' is really just a generated API key, so we # can create something fairly random for the user and use that push @opts, "--secret" => sprintf("%08x", rand(2**31)); return scalar IPC::Cmd::run( command => [ $cmd, @opts ], verbose => 1, ); } #--------------------------------------------------------------------------# # _get_config_dir #--------------------------------------------------------------------------# sub _get_config_dir { if ( defined $ENV{PERL_CPAN_REPORTER_DIR} && length $ENV{PERL_CPAN_REPORTER_DIR} ) { return $ENV{PERL_CPAN_REPORTER_DIR}; } my $conf_dir = File::Spec->catdir(File::HomeDir->my_home, ".cpanreporter"); if ($^O eq 'MSWin32') { my $alt_dir = File::Spec->catdir(File::HomeDir->my_documents, ".cpanreporter"); $conf_dir = $alt_dir if -d $alt_dir && ! -d $conf_dir; } return $conf_dir; } #--------------------------------------------------------------------------# # _get_config_file #--------------------------------------------------------------------------# sub _get_config_file { if ( defined $ENV{PERL_CPAN_REPORTER_CONFIG} && length $ENV{PERL_CPAN_REPORTER_CONFIG} ) { return $ENV{PERL_CPAN_REPORTER_CONFIG}; } else { return File::Spec->catdir( _get_config_dir, "config.ini" ); } } #--------------------------------------------------------------------------# # _get_config_options #--------------------------------------------------------------------------# sub _get_config_options { my $config = shift; # extract and return valid options, with fallback to defaults my %spec = CPAN::Reporter::Config::_config_spec(); my %active; OPTION: for my $option ( keys %spec ) { if ( exists $config->{_}{$option} ) { my $val = $config->{_}{$option}; if ( $spec{$option}{validate} && ! $spec{$option}{validate}->($option, $val) ) { $CPAN::Frontend->mywarn( "\nCPAN::Reporter: invalid option '$val' in '$option'. Using default instead.\n\n" ); $active{$option} = $spec{$option}{default}; next OPTION; } $active{$option} = $val; } else { $active{$option} = $spec{$option}{default} if defined $spec{$option}{default}; } } return \%active; } #--------------------------------------------------------------------------# # _grade_action_prompt -- describes grade action pairs #--------------------------------------------------------------------------# sub _grade_action_prompt { return << 'HERE'; Some of the following configuration options require one or more "grade:action" pairs that determine what grade-specific action to take for that option. These pairs should be space-separated and are processed left-to-right. See CPAN::Reporter documentation for more details. GRADE : ACTION ======> EXAMPLES ------- ------- -------- pass yes default:no fail no default:yes pass:no unknown ask/no default:ask/no pass:yes fail:no na ask/yes default HERE } #--------------------------------------------------------------------------# # _is_valid_action #--------------------------------------------------------------------------# my @valid_actions = qw{ yes no ask/yes ask/no ask }; sub _is_valid_action { my $action = shift; return grep { $action eq $_ } @valid_actions; } #--------------------------------------------------------------------------# # _is_valid_grade #--------------------------------------------------------------------------# my @valid_grades = qw{ pass fail unknown na default }; sub _is_valid_grade { my $grade = shift; return grep { $grade eq $_ } @valid_grades; } #--------------------------------------------------------------------------# # _normalize_id_file #--------------------------------------------------------------------------# sub _normalize_id_file { my ($id_file) = @_; # Windows does not use ~ to signify a home directory if ( $^O eq 'MSWin32' && $id_file =~ m{^~/(.*)} ) { $id_file = File::Spec->catdir(File::HomeDir->my_home, $1); } elsif ( $id_file =~ /~/ ) { $id_file = File::Spec->canonpath(File::Glob::bsd_glob( $id_file )); } unless ( File::Spec->file_name_is_absolute( $id_file ) ) { $id_file = File::Spec->catfile( CPAN::Reporter::Config::_get_config_dir(), $id_file ); } return $id_file; } #--------------------------------------------------------------------------# # _open_config_file #--------------------------------------------------------------------------# sub _open_config_file { my $config_file = _get_config_file(); my $config = Config::Tiny->read( $config_file ) or $CPAN::Frontend->mywarn("CPAN::Reporter: couldn't read configuration file " . "'$config_file': \n" . Config::Tiny->errstr() . "\n"); return $config; } #--------------------------------------------------------------------------# # _validate # # anything is OK if there is no validation subroutine #--------------------------------------------------------------------------# sub _validate { my ($name, $value) = @_; return 1 if ! exists $option_specs{$name}{validate}; return $option_specs{$name}{validate}->($name, $value); } #--------------------------------------------------------------------------# # _validate_grade_action # returns hash of grade => action # returns undef #--------------------------------------------------------------------------# sub _validate_grade_action_pair { my ($name, $option) = @_; $option ||= "no"; my %ga_map; # grade => action PAIR: for my $grade_action ( split q{ }, $option ) { my ($grade_list,$action); if ( $grade_action =~ m{.:.} ) { # parse pair for later check ($grade_list, $action) = $grade_action =~ m{\A([^:]+):(.+)\z}; } elsif ( _is_valid_action($grade_action) ) { # action by itself $ga_map{default} = $grade_action; next PAIR; } elsif ( _is_valid_grade($grade_action) ) { # grade by itself $ga_map{$grade_action} = "yes"; next PAIR; } elsif( $grade_action =~ m{./.} ) { # gradelist by itself, so setup for later check $grade_list = $grade_action; $action = "yes"; } else { # something weird, so warn and skip $CPAN::Frontend->mywarn( "\nCPAN::Reporter: ignoring invalid grade:action '$grade_action' for '$name'.\n\n" ); next PAIR; } # check gradelist my %grades = map { ($_,1) } split( "/", $grade_list); for my $g ( keys %grades ) { if ( ! _is_valid_grade($g) ) { $CPAN::Frontend->mywarn( "\nCPAN::Reporter: ignoring invalid grade '$g' in '$grade_action' for '$name'.\n\n" ); delete $grades{$g}; } } # check action if ( ! _is_valid_action($action) ) { $CPAN::Frontend->mywarn( "\nCPAN::Reporter: ignoring invalid action '$action' in '$grade_action' for '$name'.\n\n" ); next PAIR; } # otherwise, it all must be OK $ga_map{$_} = $action for keys %grades; } return scalar(keys %ga_map) ? \%ga_map : undef; } sub _validate_transport { my ($name, $option, $config) = @_; my $transport = ''; if ( $option =~ /^(\w+(?:::\w+)*)\s?/ ) { $transport = $1; my $full_class = "Test::Reporter::Transport::$transport"; eval "use $full_class ()"; if ($@) { $CPAN::Frontend->mywarn( "\nCPAN::Reporter: error loading $full_class. Please install the missing module or choose a different transport mechanism.\n\n" ); } } else { $CPAN::Frontend->mywarn( "\nCPAN::Reporter: Please provide a transport mechanism.\n\n" ); return; } # we do extra validation for Metabase and offer to create the profile if ( $transport eq 'Metabase' ) { unless ( $option =~ /\buri\s+\S+/ ) { $CPAN::Frontend->mywarn( "\nCPAN::Reporter: Please provide a target uri.\n\n" ); return; } unless ( $option =~ /\bid_file\s+(\S.+?)\s*$/ ) { $CPAN::Frontend->mywarn( "\nCPAN::Reporter: Please specify an id_file path.\n\n" ); return; } my $id_file = _normalize_id_file($1); # Offer to create if it doesn't exist if ( ! -e $id_file ) { my $answer = CPAN::Shell::colorable_makemaker_prompt( "\nWould you like to run 'metabase-profile' now to create '$id_file'?", "y" ); if ( $answer =~ /^y/i ) { return _generate_profile( $id_file, $config ); } else { $CPAN::Frontend->mywarn( <<"END_ID_FILE" ); You can create a Metabase profile by typing 'metabase-profile' in your command prompt and moving the resulting file to the location you specified. If you did not specify an absolute path, put it in your .cpanreporter directory. You will need to do this before continuing. END_ID_FILE return; } } # Warn and fail validation if there but not readable elsif ( not ( -r $id_file or -r File::Spec->catdir(_get_config_dir(), $id_file) ) ) { $CPAN::Frontend->mywarn( "CPAN::Reporter: '$id_file' was not readable.\n\n" ); return; } } # end Metabase return 1; } sub _validate_seconds { my ($name, $option) = @_; return unless defined($option) && length($option) && ($option =~ /^\d/) && $option >= 0; return $option; } sub _validate_skipfile { my ($name, $option) = @_; return unless $option; my $skipfile = File::Spec->file_name_is_absolute( $option ) ? $option : File::Spec->catfile( _get_config_dir(), $option ); return -r $skipfile ? $skipfile : undef; } 1; # ABSTRACT: Config file options for CPAN::Reporter =pod =encoding UTF-8 =head1 NAME CPAN::Reporter::Config - Config file options for CPAN::Reporter =head1 VERSION version 1.2019 =head1 SYNOPSIS From the CPAN shell: cpan> o conf init test_report =head1 DESCRIPTION Default options for CPAN::Reporter are read from a configuration file C<<< .cpanreporter/config.ini >>> in the user's home directory. (On Win32 platforms, the directory will be located in the user's "Documents" directory.) The location of the configuration directory or file may be specified using environment variables instead. The configuration file is in "ini" format, with the option name and value separated by an "=" sign email_from = "John Doe" edit_report = no Interactive configuration of email address and common action prompts may be repeated at any time from the CPAN shell. cpan> o conf init test_report If a configuration file does not exist, it will be created the first time interactive configuration is performed. Subsequent interactive configuration will also include any advanced options that have been added manually to the configuration file. =head1 INTERACTIVE CONFIGURATION OPTIONS =head2 Email Address (required) email_from = CPAN::Reporter requires users to provide an email address that will be used in the header of the report. The email address provided should be a valid address format, e.g.: email_from = user@domain email_from = John Doe email_from = "John Q. Public" =head2 Transport (required) transport = [transport args] This sets the transport mechanism passed to the C<<< transport() >>> method of L. Normally, CPAN::Reporter uses 'Metabase' for transport class (i.e. L) and will provide a default set of transport arguments. Metabase transport arguments are two space-separated keyEvalue pairs: =over =item * C<<< uri >>> -- URI for the Metabase API. Defaults to C<<< https://metabase.cpantesters.org/api/v1/ >>> =item * C<<< id_file >>> -- path to the user's Metabase profile file. Defaults to C<<< metabase_id.json >>>. (Assumed to be in the C<<< .cpanreporter >>> directory). =back Prior to sending reports, a user must have a valid profile file at the path specified. For Metabase transport, CPAN::Reporter will automatically rewrite a relative C<<< id_file >>> path as an absolute path located in the C<<< .cpanreporter >>> directory. If the specified profile file does not exist, CPAN::Reporter will offer to run C<<< metabase-profile >>> to create it. For other transport types, see the documentation that comes with your choice of Test::Reporter::Transport subclass for the proper way to set the C<<< transport >>> configuration option. =head2 Action Prompts Several steps in the generation of a test report are optional. Configuration options control whether an action should be taken automatically or whether CPAN::Reporter should prompt the user for the action to take. The action to take may be different for each report grade. For example, users may wish to customize for which grades they wish to manually review a report before sending it. Most users should just accept the default settings until they have some experience as CPAN Testers. Valid actions, and their associated meaning, are as follows: =over =item * C<<< yes >>> -- automatic yes =item * C<<< no >>> -- automatic no =item * C<<< ask/no >>> or just C<<< ask >>> -- ask each time, but default to no =item * C<<< ask/yes >>> -- ask each time, but default to yes =back For "ask" prompts, the default will be used if return is pressed immediately at the prompt or if the C<<< PERL_MM_USE_DEFAULT >>> environment variable is set to a true value. Action prompt options take one or more space-separated "grade:action" pairs, which are processed left to right. edit_report = fail:ask/yes pass:no An action by itself is taken as a default to be used for any grade which does not have a grade-specific action. A default action may also be set by using the word "default" in place of a grade. edit_report = ask/no edit_report = default:ask/no A grade by itself is taken to have the action "yes" for that grade. edit_report = default:no fail Multiple grades may be specified together by separating them with a slash. edit_report = pass:no fail/na/unknown:ask/yes The action prompt options included in interactive configuration are: =over =item * C<<< edit_report = ... >>> -- edit the test report before sending? (default:askEno passEna:no) =item * C<<< send_report = ... >>> -- should test reports be sent at all? (default:askEyes passEna:yes) =back Note that if C<<< send_report >>> is set to "no", CPAN::Reporter will still go through the motions of preparing a report, but will discard it rather than send it. A better way to disable CPAN::Reporter temporarily is with the CPAN option C<<< test_report >>>: cpan> o conf test_report 0 =head2 Mail Server (DEPRECATED) CPAN::Reporter used to send mail directly to perl.org mail servers. The C<<< smtp_server >>> option is now deprecated and will be ignored if it exists. =head1 ADVANCED CONFIGURATION OPTIONS These additional options are only necessary in special cases, for example if the default editor cannot be found or if reports shouldn't be sent in certain situations or for automated testing, and so on. =over =item * C<<< command_timeout >>> -- if greater than zero and the CPAN config is C<<< inactivity_timeout >>> is not set, then any commands executed by CPAN::Reporter will be halted after this many seconds; useful for unattended smoke testing to stop after some amount of time; generally, this should be large -- 900 seconds or more -- as some distributions' tests take quite a long time to run. On MSWin32, L is a needed and trying to kill a process may actually deadlock in some situations -- so use at your own risk. =item * C<<< editor = >>> -- editor to use to edit the test report; if not set, Test::Reporter will use environment variables C<<< VISUAL >>>, C<<< EDITOR >>> or C<<< EDIT >>> (in that order) to find an editor =item * C<<< retry_submission >>> -- if greater than zero, CPAN::Reporter will try to resend the report after a few seconds in case the first attempt fails. =item * C<<< send_duplicates = ... >>> -- should duplicates of previous reports be sent, regardless of C<<< send_report >>>? (default:no) =item * C<<< send_PL_report = ... >>> -- if defined, used in place of C<<< send_report >>> during the PL phase =item * C<<< send_make_report = ... >>> -- if defined, used in place of C<<< send_report >>> during the make phase =item * C<<< send_test_report = ... >>> -- if defined, used in place of C<<< send_report >>> during the test phase =item * C<<< send_skipfile = >>> -- filename containing regular expressions (one per line) to match against the distribution ID (e.g. 'AUTHOREDist-Name-0.01.tar.gz'); the report will not be sent if a match is found; non-absolute filename must be in the .cpanreporter config directory; =back If these options are manually added to the configuration file, they will be included (and preserved) in subsequent interactive configuration. =head2 Skipfile regular expressions Skip files are expected to have one regular expression per line and will be matched against the distribution ID, composed of the author's CPAN ID and the distribution tarball name. DAGOLDEN/CPAN-Reporter-1.00.tar.gz Lines that begin with a sharp (#) are considered comments and will not be matched. All regular expressions will be matched case insensitive and will not be anchored unless you provide one. As the format of a distribution ID is "AUTHOREtarball", anchoring at the start of the line with a caret (^) will match the author and with a slash (E) will match the distribution. # any distributions by JOHNDOE ^JOHNDOE # any distributions starting with Win32 /Win32 # a particular very specific distribution ^JOHNDOE/Foo-Bar-3.14 =head1 CONFIGURATION OPTIONS FOR DEBUGGING These options are useful for debugging only: =over =item * C<<< debug = >>> -- turns debugging onEoff =back =head1 ENVIRONMENT The following environment variables may be set to alter the default locations for CPAN::Reporter files: =over =item * C<<< PERL_CPAN_REPORTER_DIR >>> -- if set, this directory is used in place of the default C<<< .cpanreporter >>> directory; this will affect not only the location of the default C<<< config.ini >>>, but also the location of the L database and any other files that live in that directory =item * C<<< PERL_CPAN_REPORTER_CONFIG >>> -- if set, this file is used in place of the default C<<< config.ini >>> file; it may be in any directory, regardless of the choice of configuration directory =back =head1 SEE ALSO =over =item * L =item * L =item * L =back =head1 AUTHOR David Golden =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2023 by David Golden. This is free software, licensed under: The Apache License, Version 2.0, January 2004 =cut __END__ # vim: ts=4 sts=4 sw=4 et: Complex.pm100644000765000024 7014423611161 20373 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/perl5lib/Boguspackage Bogus::Complex; $VERSION = 3.14; use strict; 1; minimum-version.t100644000765000024 15214423611161 20667 0ustar00garustaff000000000000CPAN-Reporter-1.2019/xt/authoruse strict; use warnings; use Test::More; use Test::MinimumVersion; all_minimum_version_ok( qq{5.010} ); Makefile.PL100644000765000024 52014423611161 20546 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/NoTestDir# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; NoTestTarget000755000765000024 014423611161 17167 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 34514423611161 20605 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/NoTestTargetuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; PL-NoSupport000755000765000024 014423611161 17066 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 37714423611161 20511 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-NoSupportuse strict; use Module::Build; die "no support for OS"; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; Makefile.PL100644000765000024 56214423611161 20467 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-Fail# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => { 'Die.PL' => 'impossible_file.pm' }, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; Makefile.PL100644000765000024 52014423611161 20473 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-BailOut# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; t-PrereqFail000755000765000024 014423611161 17077 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 43514423611161 20515 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqFailuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', requires => { 'File::Spec' => 99999.9 } )->create_build_script; t-PrereqMiss000755000765000024 014423611161 17137 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 45214423611161 20554 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqMissuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', requires => { 'Bogus::Module::Doesnt::Exist' => 0, } )->create_build_script; Build.PL100644000765000024 34514423611161 20464 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-Failuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; Build.PL100644000765000024 34514423611161 20517 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-Passuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; History.pm100644000765000024 3302314423611161 20542 0ustar00garustaff000000000000CPAN-Reporter-1.2019/lib/CPAN/Reporteruse strict; package CPAN::Reporter::History; our $VERSION = '1.2019'; use vars qw/@ISA @EXPORT_OK/; use Config; use Carp; use Fcntl qw/:flock/; use File::HomeDir (); use File::Path (qw/mkpath/); use File::Spec (); use IO::File (); use CPAN (); # for printing warnings use CPAN::Reporter::Config (); require Exporter; @ISA = qw/Exporter/; @EXPORT_OK = qw/have_tested/; #--------------------------------------------------------------------------# # Some platforms don't implement flock, so fake it if necessary #--------------------------------------------------------------------------# BEGIN { eval { my $temp_file = File::Spec->catfile( File::Spec->tmpdir(), $$ . time() ); my $fh = IO::File->new( $temp_file, "w" ); flock $fh, LOCK_EX; $fh->close; unlink $temp_file; }; if ( $@ ) { *CORE::GLOBAL::flock = sub (*$) { 1 }; } } #--------------------------------------------------------------------------# # Back-compatibility checks -- just once per load #--------------------------------------------------------------------------# # 0.99_08 changed the history file format and name # If an old file exists, convert it to the new name and format. Note -- # someone running multiple installations of CPAN::Reporter might have old # and new versions running so only convert in the case where the old file # exists and the new file does not { my $old_history_file = _get_old_history_file(); my $new_history_file = _get_history_file(); last if -f $new_history_file || ! -f $old_history_file; $CPAN::Frontend->mywarn("CPAN::Reporter: Your history file is in an old format. Upgrading automatically.\n"); # open old and new files my ($old_fh, $new_fh); if (! ( $old_fh = IO::File->new( $old_history_file ) ) ) { $CPAN::Frontend->mywarn("CPAN::Reporter: error opening old history file: $!\nContinuing without conversion.\n"); last; } if (! ($new_fh = IO::File->new( $new_history_file, "w" ) ) ) { $CPAN::Frontend->mywarn("CPAN::Reporter: error opening new history file: $!\nContinuing without conversion.\n"); last; } print {$new_fh} _generated_by(); while ( my $line = <$old_fh> ) { chomp $line; # strip off perl version and convert # try not to match 5.1 from "MSWin32-x86-multi-thread 5.1" # from really old CPAN::Reporter history formats my ($old_version, $perl_patch); if ( $line =~ m{ (5\.0\d{2,5}) ?(patch \d+)?\z} ) { ($old_version, $perl_patch) = ($1, $2); $line =~ s{ (5\.0\d{2,5}) ?(patch \d+)?\z}{}; } my $pv = $old_version ? "perl-" . _perl_version($old_version) : "unknown"; $pv .= " $perl_patch" if $perl_patch; my ($grade_dist, $arch_os) = ($line =~ /(\S+ \S+) (.+)/); print {$new_fh} "test $grade_dist ($pv) $arch_os\n"; } close $old_fh; close $new_fh; } #--------------------------------------------------------------------------# # Public methods #--------------------------------------------------------------------------# #--------------------------------------------------------------------------# # have_tested -- search for dist in history file #--------------------------------------------------------------------------# sub have_tested { ## no critic RequireArgUnpacking # validate arguments croak "arguments to have_tested() must be key value pairs" if @_ % 2; my $args = { @_ }; my @bad_params = grep { $_ !~ m{^(?:dist|phase|grade|perl|archname|osvers)$} } keys %$args; croak "bad parameters for have_tested(): " . join(q{, },@bad_params) if @bad_params; # DWIM: grades to upper case $args->{grade} = uc $args->{grade} if defined $args->{grade}; # default to current platform $args->{perl} = _format_perl_version() unless defined $args->{perl}; $args->{archname} = _format_archname() unless defined $args->{archname}; $args->{osvers} = $Config{osvers} unless defined $args->{osvers}; my @found; my $history = _open_history_file('<') or return; flock $history, LOCK_SH; <$history>; # throw away format line while ( defined (my $line = <$history>) ) { my $fields = _split_history( $line ) or next; push @found, $fields if _match($fields, $args); } $history->close; return @found; } #--------------------------------------------------------------------------# # Private methods #--------------------------------------------------------------------------# #--------------------------------------------------------------------------# # _format_history -- # # phase grade dist-version (perl-version patchlevel) archname osvers #--------------------------------------------------------------------------# sub _format_history { my ($result) = @_; my $phase = $result->{phase}; my $grade = uc $result->{grade}; my $dist_name = $result->{dist_name}; my $perlver = "perl-" . _format_perl_version(); my $osvers = $Config{osvers}; my $archname = _format_archname(); return "$phase $grade $dist_name ($perlver) $archname $osvers\n"; } #--------------------------------------------------------------------------# # _format_archname -- # # appends info about taint being disabled to Config.pm's archname #--------------------------------------------------------------------------# sub _format_archname { my $archname = $Config{archname}; # `taint_disabled` is correctly set as of perl-blead@da791ecc, which will # be in 5.37.12 and later. Before then it is always false (indeed, # non-existent) and the only way to check whether taint is disabled is to # check the ccflags. Before that and its related commits (see # https://github.com/Perl/perl5/pull/20983) were merged it was impossible # to build a clean perl with taint support disabled that passed all its own # tests. if($Config{taint_disabled}) { $archname .= '-silent' if($Config{taint_disabled} eq 'silent'); $archname .= '-no-taint-support'; } return $archname; } #--------------------------------------------------------------------------# # _format_perl_version #--------------------------------------------------------------------------# sub _format_perl_version { my $pv = _perl_version(); $pv .= " patch $Config{perl_patchlevel}" if $Config{perl_patchlevel}; return $pv; } sub _generated_by { return "# Generated by CPAN::Reporter " . "$CPAN::Reporter::History::VERSION\n"; } #--------------------------------------------------------------------------# # _get_history_file #--------------------------------------------------------------------------# sub _get_history_file { return File::Spec->catdir( CPAN::Reporter::Config::_get_config_dir(), "reports-sent.db" ); } #--------------------------------------------------------------------------# # _get_old_history_file -- prior to 0.99_08 #--------------------------------------------------------------------------# sub _get_old_history_file { return File::Spec->catdir( CPAN::Reporter::Config::_get_config_dir(), "history.db" ); } #--------------------------------------------------------------------------# # _is_duplicate #--------------------------------------------------------------------------# sub _is_duplicate { my ($result) = @_; my $log_line = _format_history( $result ); my $history = _open_history_file('<') or return; my $found = 0; flock $history, LOCK_SH; while ( defined (my $line = <$history>) ) { if ( $line eq $log_line ) { $found++; last; } } $history->close; return $found; } #--------------------------------------------------------------------------# # _match #--------------------------------------------------------------------------# sub _match { my ($fields, $search) = @_; for my $k ( keys %$search ) { next if $search->{$k} eq q{}; # empty string matches anything return unless $fields->{$k} eq $search->{$k}; } return 1; # all keys matched } #--------------------------------------------------------------------------# # _open_history_file #--------------------------------------------------------------------------# sub _open_history_file { my $mode = shift || '<'; my $history_filename = _get_history_file(); my $file_exists = -f $history_filename; # shortcut if reading and doesn't exist return if ( $mode eq '<' && ! $file_exists ); # open it in the desired mode my $history = IO::File->new( $history_filename, $mode ) or $CPAN::Frontend->mywarn("CPAN::Reporter: couldn't open history file " . "'$history_filename': $!\n"); # if writing and it didn't exist before, initialize with header if ( substr($mode,0,1) eq '>' && ! $file_exists ) { print {$history} _generated_by(); } return $history; } #--------------------------------------------------------------------------# # _perl_version #--------------------------------------------------------------------------# sub _perl_version { my $ver = shift || "$]"; $ver =~ qr/(\d)\.(\d{3})(\d{0,3})/; my ($maj,$min,$pat) = (0 + ($1||0), 0 + ($2||0), 0 + ($3||0)); my $pv; if ( $min < 6 ) { $pv = $ver; } else { $pv = "$maj\.$min\.$pat"; } return $pv; } #--------------------------------------------------------------------------# # _record_history #--------------------------------------------------------------------------# sub _record_history { my ($result) = @_; my $log_line = _format_history( $result ); my $history = _open_history_file('>>') or return; flock( $history, LOCK_EX ); seek( $history, 0, 2 ); # seek to end of file $history->print( $log_line ); flock( $history, LOCK_UN ); $history->close; return; } #--------------------------------------------------------------------------# # _split_history # # splits lines created with _format_history. Returns hash ref with # phase, grade, dist, perl, platform #--------------------------------------------------------------------------# sub _split_history { my ($line) = @_; chomp $line; my %fields; @fields{qw/phase grade dist perl archname osvers/} = $line =~ m{ ^(\S+) \s+ # phase (\S+) \s+ # grade (\S+) \s+ # dist \(perl- ([^)]+) \) \s+ # (perl-version-patchlevel) (\S+) \s+ # archname (.+)$ # osvers }xms; # return nothing if parse fails return if scalar keys %fields == 0;# grep { ! defined($_) } values %fields; # otherwise return hashref return \%fields; } 1; # ABSTRACT: Read or write a CPAN::Reporter history log __END__ =pod =encoding UTF-8 =head1 NAME CPAN::Reporter::History - Read or write a CPAN::Reporter history log =head1 VERSION version 1.2019 =head1 SYNOPSIS use CPAN::Reporter::History 'have_tested'; @results = have_tested( dist => 'Dist-Name-1.23' ); =head1 DESCRIPTION Interface for interacting with the CPAN::Reporter history file. Most methods are private for use only within CPAN::Reporter itself. However, a public function is provided to query the history file for results. =head1 USAGE The following function is available. It is not exported by default. =head2 C<<< have_tested() >>> # all reports for Foo-Bar-1.23 @results = have_tested( dist => 'Foo-Bar-1.23' ); # all NA reports @results = have_tested( grade => 'NA' ); # all reports on the current Perl/platform @results = have_tested(); Searches the CPAN::Reporter history file for records exactly matching search criteria, given as pairs of field-names and desired values. Ordinary search criteria include: =over =item * C<<< dist >>> -- the distribution tarball name without any filename suffix; from a C<<< CPAN::Distribution >>> object, this is provided by the C<<< base_id >>> method. =item * C<<< phase >>> -- phase the report was generated during: either 'PL', 'make' or 'test' =item * C<<< grade >>> -- CPAN Testers grade: 'PASS', 'FAIL', 'NA' or 'UNKNOWN'; Also may be 'DISCARD' for any failing reports not sent due to missing prerequisites =back Without additional criteria, a search will be limited to the current version of Perl and the current architecture and OS version. Additional criteria may be specified explicitly or, by specifying the empty string, C<<< q{} >>>, will match that field for I record. # all reports for Foo-Bar-1.23 on any version of perl # on the current architecture and OS version @results = have_tested( dist => 'Foo-Bar-1.23', perl => q{} ); These additional criteria include: =over =item * C<<< perl >>> -- perl version and possible patchlevel; this will be dotted decimal (5.6.2) starting with version 5.6, or will be numeric style as given by C<<< $] >>> for older versions; if a patchlevel exists, it must be specified similar to "5.11.0 patch 12345" =item * C<<< archname >>> -- platform architecture name as given by $Config{archname} =item * C<<< osvers >>> -- operating system version as given by $Config{osvers} =back The function returns an array of hashes representing each test result, with all of the fields listed above. =head1 SEE ALSO =over =item * L =item * L =back =head1 AUTHOR David Golden =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2023 by David Golden. This is free software, licensed under: The Apache License, Version 2.0, January 2004 =cut Conflict.pm100644000765000024 7114423611161 20526 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/perl5lib/Boguspackage Bogus::Conflict; $VERSION = 3.14; use strict; 1; PL-PrereqFail000755000765000024 014423611161 17147 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 50614423611161 20564 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-PrereqFailuse strict; use Module::Build; use Unavailable::Module; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', requires => { 'Unavailable::Module' => 0, } )->create_build_script; PL-PrereqMiss000755000765000024 014423611161 17207 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 50014423611161 20616 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-PrereqMissuse strict; use Module::Build; use File::Spec 9999.9; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', requires => { 'File::Spec' => 9999.9, } )->create_build_script; t000755000765000024 014423611161 16635 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-Fail01_Bogus.t100644000765000024 14214423611161 20516 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-Fail/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); make-PrereqFail000755000765000024 014423611161 17551 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusDie.PL100644000765000024 4614423611161 20607 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-PrereqFailuse strict; use File::Spec 9999.99; make-PrereqMiss000755000765000024 014423611161 17611 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusDie.PL100644000765000024 5114423611161 20643 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-PrereqMissuse strict; use Unavailable::Module 0; t000755000765000024 014423611161 16647 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-BailOut01_Bogus.t100644000765000024 24014423611161 20527 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-BailOut/t# Bogus::Pass tests use strict; use Test::More; plan tests => 2 ; ok("First test passes"); BAIL_OUT("Pressed the eject button"); ok("Second test passes"); Makefile.PL100644000765000024 52014423611161 20731 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-NoOutput# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; t-RequirePerl000755000765000024 014423611161 17304 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 34514423611161 20722 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-RequirePerluse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; 56_test_report_by_harness.t100644000765000024 741214423611161 21166 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t#!perl use strict; BEGIN{ if (not $] < 5.006) { require warnings; warnings->import } } select(STDERR); $|=1; select(STDOUT); $|=1; use Test::More; use lib 't/lib'; use MockCPANDist; use Helper; use Frontend; require Test::Harness; my $harness_version = Test::Harness->VERSION; my $is_th2xx = $harness_version < 3; my $is_th3xx = $harness_version >= 3; my $is_th305 = $harness_version >= '3.05'; # every distro must have th2xx as a fallback my @test_distros = ( { name => 't-NoOutput', th2xx => { eumm_success => 1, eumm_grade => "unknown", eumm_msg => "No tests were run", mb_success => 1, mb_grade => "unknown", mb_msg => "No tests were run", }, th305 => { eumm_success => 0, eumm_grade => "fail", eumm_msg => "One or more tests failed", mb_success => 0, mb_grade => "fail", mb_msg => "One or more tests failed", }, }, { name => 't-NoOutput-die', th2xx => { eumm_success => 1, eumm_grade => "unknown", eumm_msg => "No tests were run", mb_success => 1, mb_grade => "unknown", mb_msg => "No tests were run", }, th305 => { eumm_success => 0, eumm_grade => "fail", eumm_msg => "One or more tests failed", mb_success => 0, mb_grade => "fail", mb_msg => "One or more tests failed", }, }, { name => 'test.pl-NoOutput-OK', th2xx => { eumm_success => 1, eumm_grade => "pass", eumm_msg => "'make test' no errors", mb_success => 1, mb_grade => "unknown", mb_msg => "No tests were run", }, th305 => { eumm_success => 1, eumm_grade => "pass", eumm_msg => "'make test' no errors", mb_success => 0, mb_grade => "fail", mb_msg => "One or more tests failed", }, }, { name => 'test.pl-NoOutput-NOK', th2xx => { eumm_success => 0, eumm_grade => "fail", eumm_msg => "'make test' error detected", mb_success => 1, mb_grade => "unknown", mb_msg => "No tests were run", }, th305 => { eumm_success => 0, eumm_grade => "fail", eumm_msg => "'make test' error detected", mb_success => 0, mb_grade => "fail", mb_msg => "One or more tests failed", }, }, ); plan tests => 1 + test_fake_config_plan() + test_grade_test_plan() * @test_distros; #--------------------------------------------------------------------------# # Fixtures #--------------------------------------------------------------------------# my $mock_dist = MockCPANDist->new( pretty_id => "JOHNQP/Bogus-Module-1.23.tar.gz", prereq_pm => { requires => { 'File::Spec' => 0 }, }, author_id => "JOHNQP", author_fullname => "John Q. Public", ); #--------------------------------------------------------------------------# # tests #--------------------------------------------------------------------------# require_ok('CPAN::Reporter'); test_fake_config(); for my $case ( @test_distros ) { my $target_version = $is_th305 && exists $case->{th305} ? "th305" : $is_th3xx && exists $case->{th3xx} ? "th3xx" : "th2xx" ; my %target_case = ( name => $case->{name}, %{$case->{$target_version}}, ); test_grade_test( \%target_case, $mock_dist ); } NoVersion.pm100644000765000024 5114423611161 20705 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/perl5lib/Boguspackage Bogus::NoVersion; use strict; 1; Makefile.PL100644000765000024 52014423611161 21072 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/NoTestFiles# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; PL-RequirePerl000755000765000024 014423611161 17354 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 36514423611161 20774 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-RequirePerluse strict; use Module::Build; require 7.000; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; make-RequirePerl000755000765000024 014423611161 17756 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusDie.PL100644000765000024 4014423611161 21006 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-RequirePerluse strict; require 5.999999; t-Harness-Fail000755000765000024 014423611161 17321 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 74414423611161 20742 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Harness-Failuse strict; use Module::Build; my $mb = Module::Build->subclass( code => q( sub ACTION_test { die "Can't execute: ... open3: IO::Pipe: Can't spawn-NOWAIT: No such file or directory at C:/strawberry/perl/lib/TAP/Parser/Iterator/Process.pm line 154\n"; } ) ); $mb->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', subclass => )->create_build_script; t-NoOutput-die000755000765000024 014423611161 17401 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 34514423611161 21017 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-NoOutput-dieuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; t000755000765000024 014423611161 17105 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-NoOutput01_Bogus.t100644000765000024 6114423611161 20746 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-NoOutput/t# Bogus::Pass tests use strict; use Test::More; Makefile.PL100644000765000024 52014423611161 21105 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-NoSupport# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; t-Recurse-Pass000755000765000024 014423611161 17361 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 34514423611161 20777 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Passuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; Makefile.PL100644000765000024 76414423611161 21270 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/NoTestTarget# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; package MY; sub test {}; sub special_targets { my ($self) = shift; my $frag = $self->SUPER::special_targets(); $frag =~ s{\btest\b}{}ims; return $frag; } Makefile.PL100644000765000024 55314423611161 21163 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-NoSupport# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; die "no support for OS"; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; PL-PrereqMissOK000755000765000024 014423611161 17441 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 45414423611161 21060 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-PrereqMissOKuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', requires => { 'Unavailable::Module' => 0, } )->create_build_script; Build.PL100644000765000024 75414423611161 21173 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-PrereqFailuse strict; use Module::Build; my $class = Module::Build->subclass( subclass => "FixedMB", code => <<'SUBCLASS' ); sub ACTION_build { eval "require File::Spec 9999.99" or die $@; } SUBCLASS $class->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', PL_files => { 'Die.PL' => 'impossible_file.pm' }, requires => { 'File::Spec' => 9999.99 }, )->create_build_script; Build.PL100644000765000024 76014423611161 21230 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-PrereqMissuse strict; use Module::Build; my $class = Module::Build->subclass( subclass => "FixMB", code => <<'SUBCLASS' ); sub ACTION_build { eval "require Unavailable::Module 0" or die $@; } SUBCLASS $class->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', PL_files => { 'Die.PL' => 'impossible_file.pm' }, requires => { 'Unavailable::Module' => 0 }, )->create_build_script; t-MultipleMatch000755000765000024 014423611161 17615 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 72714423611161 21237 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-MultipleMatchuse strict; use Module::Build; my $class = Module::Build->subclass( class => "Module::Build::Bogus", code => <<'SUBCLASS', ); sub ACTION_test { my $self = shift; print "\nAll tests successful.\n\n"; $self->SUPER::ACTION_test; } SUBCLASS $class->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; t000755000765000024 014423611161 17261 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-NoSupport01_Bogus.t100644000765000024 14414423611161 21144 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-NoSupport/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; BAIL_OUT "no support for os"; t-OSUnsupported000755000765000024 014423611161 17637 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 34514423611161 21255 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-OSUnsupporteduse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; Makefile.PL100644000765000024 51114423611161 21166 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqFail# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => { 'File::Spec' => 99999.9 }, ); Makefile.PL100644000765000024 52614423611161 21234 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqMiss# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => { 'Bogus::Module::Doesnt::Exist' => 0, }, ); t-PrereqPerl-OK000755000765000024 014423611161 17435 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 42214423611161 21047 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqPerl-OKuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', requires => { 'perl' => 5, } )->create_build_script; Makefile.PL100644000765000024 52014423611161 21135 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-Fail# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; Makefile.PL100644000765000024 52014423611161 21170 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-Pass# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; PL-MIRequirePerl000755000765000024 014423611161 17602 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 47014423611161 21217 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-MIRequirePerluse strict; use Module::Build; die 'ERROR: perl: Version 5.00505 is installed, but we need version >= 5.999999'; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; t000755000765000024 014423611161 17331 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-NoSupport01_Bogus.t100644000765000024 14214423611161 21212 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-NoSupport/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); PL-OSUnsupported000755000765000024 014423611161 17707 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 37414423611161 21327 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-OSUnsupporteduse strict; use Module::Build; die "OS Unsupported"; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; Makefile.PL100644000765000024 54614423611161 21246 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-PrereqFail# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; use Unavailable::Module; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => { 'Unavailable::Module' => 0 }, ); Makefile.PL100644000765000024 54114423611161 21301 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-PrereqMiss# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; use File::Spec 9999.9; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => { 'File::Spec' => 9999.9, }, ); Build.PL100644000765000024 73514423611161 21377 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-RequirePerluse strict; use Module::Build; my $class = Module::Build->subclass( subclass => "FixedMB", code => <<'SUBCLASS' ); sub ACTION_build { eval "require 5.999999" or die $@; } SUBCLASS $class->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', PL_files => { 'Die.PL' => 'impossible_file.pm' }, requires => { 'perl' => 5.999999 }, )->create_build_script; t000755000765000024 014423611161 17342 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqFail01_Bogus.t100644000765000024 15214423611161 21224 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqFail/t# Bogus::Pass tests use strict; use File::Spec 99999.9; plan tests => 1 ; pass( "Passed this test" ); t000755000765000024 014423611161 17402 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqMiss01_Bogus.t100644000765000024 20414423611161 21262 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqMiss/t# Bogus::Pass tests use strict; use Bogus::Module::Doesnt::Exist; use Test::More; plan tests => 1 ; pass( "Passed this test" ); t-PrereqPerl-NOK000755000765000024 014423611161 17553 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 42314423611161 21166 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqPerl-NOKuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', requires => { 'perl' => 42, } )->create_build_script; t-Recurse-Fail-t000755000765000024 014423611161 17567 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 34514423611161 21205 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-tuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; Makefile.PL100644000765000024 52114423611161 21374 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-RequirePerl# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; PrereqCheck.pm100644000765000024 2436014423611161 21301 0ustar00garustaff000000000000CPAN-Reporter-1.2019/lib/CPAN/Reporteruse strict; package CPAN::Reporter::PrereqCheck; our $VERSION = '1.2019'; use ExtUtils::MakeMaker 6.36; use File::Spec; use CPAN::Version; _run() if ! caller(); sub _run { my %saw_mod; # read module and prereq string from STDIN # do this as early as possible: https://github.com/cpan-testers/CPAN-Reporter/issues/20 my @modules; while ( <> ) { push @modules, $_; } local *DEVNULL; open DEVNULL, ">" . File::Spec->devnull; ## no critic # ensure actually installed, not ./inc/... or ./t/..., etc. local @INC = grep { $_ ne '.' } @INC; for (@modules) { m/^(\S+)\s+([^\n]*)/; my ($mod, $need) = ($1, $2); die "Couldn't read module for '$_'" unless $mod; $need = 0 if not defined $need; # only evaluate a module once next if $saw_mod{$mod}++; # get installed version from file with EU::MM my($have, $inst_file, $dir, @packpath); if ( $mod eq "perl" ) { $have = $]; } else { @packpath = split( /::/, $mod ); $packpath[-1] .= ".pm"; if (@packpath == 1 && $packpath[0] eq "readline.pm") { unshift @packpath, "Term", "ReadLine"; # historical reasons } INCDIR: foreach my $dir (@INC) { my $pmfile = File::Spec->catfile($dir,@packpath); if (-f $pmfile){ $inst_file = $pmfile; last INCDIR; } } # get version from file or else report missing if ( defined $inst_file ) { $have = my $preliminary_version = MM->parse_version($inst_file); $preliminary_version = "0" if ! defined $preliminary_version || $preliminary_version eq 'undef'; # report broken if it can't be loaded # "select" to try to suppress spurious newlines select DEVNULL; ## no critic if ( ! _try_load( $mod, $preliminary_version ) ) { select STDOUT; ## no critic print "$mod 0 broken\n"; next; } # Now the module is loaded: if MM->parse_version previously failed to # get the version, then we can now look at the value of the $VERSION # variable. if (! defined $have || $have eq 'undef') { no strict 'refs'; my $mod_version = ${$mod.'::VERSION'}; if (defined $mod_version) { $have = $mod_version; } else { $have = 0; # fallback } } select STDOUT; ## no critic } else { print "$mod 0 n/a\n"; next; } } # complex requirements are comma separated my ( @requirements ) = split /\s*,\s*/, $need; my $passes = 0; RQ: for my $rq (@requirements) { if ($rq =~ s|>=\s*||) { # no-op -- just trimmed string } elsif ($rq =~ s|>\s*||) { if (CPAN::Version->vgt($have,$rq)){ $passes++; } next RQ; } elsif ($rq =~ s|!=\s*||) { if (CPAN::Version->vcmp($have,$rq)) { $passes++; # didn't match } next RQ; } elsif ($rq =~ s|<=\s*||) { if (! CPAN::Version->vgt($have,$rq)){ $passes++; } next RQ; } elsif ($rq =~ s|<\s*||) { if (CPAN::Version->vlt($have,$rq)){ $passes++; } next RQ; } # if made it here, then it's a normal >= comparison if (! CPAN::Version->vlt($have, $rq)){ $passes++; } } my $ok = $passes == @requirements ? 1 : 0; print "$mod $ok $have\n" } return; } sub _try_load { my ($module, $have) = @_; my @do_not_load = ( # should not be loaded directly qw/Term::ReadLine::Perl Term::ReadLine::Gnu MooseX::HasDefaults Readonly::XS POE::Loop::Event SOAP::Constants Moose::Meta::TypeConstraint::Parameterizable Moose::Meta::TypeConstraint::Parameterized/, 'Devel::Trepan', #"require Enbugger; require Devel::Trepan;" starts debugging session 'Test::BDD::Cucumber::Loader', #by doing something to Test::Builder breaks Test::SharedFork and any module that uses it #removed modules, they still exist but die qw/Pegex::Mo YAML::LibYAML Params::CheckCompiler/, #have additional prereqs qw/Log::Dispatch::Email::MailSender RDF::NS::Trine Plack::Handler::FCGI Web::Scraper::LibXML DBIx::Class::EncodedColumn::Crypt::Eksblowfish::Bcrypt/, #modify @INC. 'lib' appearing in @INC will prevent correct #checking of modules with XS part, for ex. List::Util qw/ExtUtils::ParseXS ExtUtils::ParseXS::Utilities/, #require special conditions to run qw/mylib Test::YAML Cache::Reddit Dist::Zilla::Plugin::TestMLIncluder/, #print text to STDOUT which C::R::PC cannot intercept qw/Test::Sys::Info Test::Subs/, #do not return true value qw/perlsecret Alt::Crypt::RSA::BigInt/, #Try::Tiny::Tiny and modules that use it conflict with several modules 'Try::Tiny::Tiny', 'Date::Lectionary::Time', ); my %loading_conflicts = ( 'signatures' => ['Catalyst'], 'Dancer::Plugin::FlashMessage' => ['Dancer::Plugin::FlashNote'], 'Dancer::Plugin::FlashNote' => ['Dancer::Plugin::FlashMessage'], 'Dancer::Plugin::Mongoose' => ['Dancer::Plugin::DBIC'], 'Dancer::Plugin::DBIC' => ['Dancer::Plugin::Mongoose'], 'Test::Mock::LWP::UserAgent' => ['HTTP::Response'], 'Test::BDD::Cucumber::Loader' => ['Test::Exception', 'Test::MockObject', 'Test::SharedFork'], #works in different order 'Test::SharedFork' => ['threads'], #dies if $INC{'threads.pm'} 'Test::TCP' => ['threads'], #loads Test::SharedFork 'Test::Fake::HTTPD' => ['threads'], #loads Test::SharedFork 'Plack::Test::Suite' => ['threads'], #loads Test::SharedFork #Note: Test::Perl::Critic and other modules load threads, so reordering will not help 'App::Sqitch' => ['Moose'], #has "no Moo::sification" ); #modules that conflict with each other my %load_before = ( 'Tk::Font' => 'Tk', 'Tk::Widget' => 'Tk', 'Tk::Label' => 'Tk', 'Tk::Menubutton' => 'Tk', 'Tk::Entry' => 'Tk', 'Class::MOP::Class' => 'Class::MOP', 'Moose::Meta::TypeConstraint::Role' => 'Moose', 'Moose::Meta::TypeConstraint::Union' => 'Moose', 'Moose::Meta::Attribute::Native' => 'Class::MOP', 'Moose::Meta::Role::Attribute' => 'Class::MOP', 'Moose::Util::TypeConstraints' => 'Moose', 'Test::More::Hooks' => 'Test::More', 'Net::HTTP::Spore::Middleware::DefaultParams' => 'Net::HTTP::Spore::Meta::Method', 'Log::Log4perl::Filter' => 'Log::Log4perl', 'RDF::DOAP::Project' => 'RDF::Trine', #or other modules that use RDF::Trine will fail 'Win32::API::Type' => 'Win32::API', 'Dancer2::Plugin::DBIC' => 'Dancer2', #or later Strehler::API will fail 'Wx::AUI' => 'Wx', 'Dist::Zilla::Role::Tempdir' => 'Dist::Zilla', # or it would not be possible to check Dist::Zilla 'Pod::Perldoc::ToMan' => 'Pod::Perldoc', ); # M::I < 0.95 dies in require, so we can't check if it loads # Instead we just pretend that it works if ( $module eq 'Module::Install' && $have < 0.95 ) { return 1; } # circular dependency with Catalyst::Runtime, so this module # does not depends on it, but still does not work without it. elsif ( $module eq 'Catalyst::DispatchType::Regex' && $have <= 5.90032 ) { return 1; } elsif ( grep { $_ eq $module } @do_not_load ) { return 1; } # loading Acme modules like Acme::Bleach can do bad things, # so never try to load them; just pretend that they work elsif( $module =~ /^Acme::/ ) { return 1; } if ( exists $loading_conflicts{$module} ) { foreach my $mod1 ( @{ $loading_conflicts{$module} } ) { my $file = "$mod1.pm"; $file =~ s{::}{/}g; if (exists $INC{$file}) { return 1; } } } if (exists $load_before{$module}) { eval "require $load_before{$module};1;"; } my $file = "$module.pm"; $file =~ s{::}{/}g; return eval {require $file; 1}; ## no critic } 1; # ABSTRACT: Modulino for prerequisite tests __END__ =pod =encoding UTF-8 =head1 NAME CPAN::Reporter::PrereqCheck - Modulino for prerequisite tests =head1 VERSION version 1.2019 =head1 SYNOPSIS require CPAN::Reporter::PrereqCheck; my $prereq_check = $INC{'CPAN/Reporter/PrereqCheck.pm'}; my $result = qx/$perl $prereq_check < $prereq_file/; =head1 DESCRIPTION This modulino determines whether a list of prerequisite modules are available and, if so, their version number. It is designed to be run as a script in order to provide this information from the perspective of a subprocess, just like CPAN::Reporter's invocation of C<<< perl Makefile.PL >>> and so on. It reads a module name and prerequisite string pair from each line of input and prints out the module name, 0 or 1 depending on whether the prerequisite is satisfied, and the installed module version. If the module is not available, it will print "nEa" for the version. If the module is available but can't be loaded, it will print "broken" for the version. Modules without a version will be treated as being of version "0". No user serviceable parts are inside. This modulino is packaged for internal use by CPAN::Reporter. =head1 BUGS Please report any bugs or feature using the CPAN Request Tracker. Bugs can be submitted through the web interface at L When submitting a bug or request, please include a test-file or a patch to an existing test-file that illustrates the bug or desired feature. =head1 SEE ALSO =over =item * L -- main documentation =back =head1 AUTHOR David Golden =head1 COPYRIGHT AND LICENSE This software is Copyright (c) 2023 by David Golden. This is free software, licensed under: The Apache License, Version 2.0, January 2004 =cut reports-sent-longer.db100644000765000024 244314423611161 21640 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/history# Generated by CPAN::Reporter 0.99_10 -- fake stuff won't collide with tester test PASS Devel-CheckLib-0.2 (perl-9.8.8) not-a-real-archname fake-os-version test PASS ExtUtils-CBuilder-0.19 (perl-9.002) also-not-an-archname another-fake-version test NA ExtUtils-ParseXS-2.18 (perl-9.002) also-not-an-archname another-fake-version test FAIL Module-Build-0.2808 (perl-9.002) also-not-an-archname another-fake-version test PASS Inline-0.44 (perl-9.8.8) not-a-real-archname fake-os-version make FAIL CPAN-Test-Dummy-Perl5-Make-FailLate-1.00 (perl-9.8.8) not-a-real-archname fake-os-version test PASS URI-Find-UTF8-0.02 (perl-9.10.0) not-a-real-archname fake-os-version test FAIL Proc-Exists-0.03 (perl-9.10.0) not-a-real-archname fake-os-version PL NA Mac-iTerm-LaunchPad-1.008 (perl-9.10.0) not-a-real-archname fake-os-version test PASS Cache-Memcached-Fast-0.07 (perl-9.10.0) not-a-real-archname fake-os-version test PASS PowerDNS-Control-Client-0.02 (perl-9.10.0) not-a-real-archname fake-os-version test PASS RPC-XML-0.59 (perl-9.10.0) not-a-real-archname fake-os-version test PASS Net-MirrorDir-0.07 (perl-9.10.0) not-a-real-archname fake-os-version test PASS ExtUtils-CBuilder-0.21 (perl-9.10.0) not-a-real-archname fake-os-version test PASS ExtUtils-ParseXS-2.18 (perl-9.10.0) not-a-real-archname fake-os-version PL-ConfigRequires000755000765000024 014423611161 20042 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 47314423611161 21462 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-ConfigRequiresuse strict; use Module::Build; use Local::Config; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', dist_abstract => 'Bogus', create_makefile_pl => 'traditional', requires => { } )->create_build_script; MANIFEST100644000765000024 13514423611161 21312 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-ConfigRequiresBuild.PL lib/Bogus/Module.pm Makefile.PL MANIFEST This list of files META.yml t/01_Bogus.t META.yml100644000765000024 44514423611161 21436 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-ConfigRequires--- name: Bogus-Module version: 0.01 author: - 'David A. Golden ' abstract: Bogus license: unknown configure_requires: Local::Config: 0 generated_by: Module::Build version 0.280801 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.2.html version: 1.2 t000755000765000024 014423611161 17412 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-PrereqFail01_Bogus.t100644000765000024 15214423611161 21274 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-PrereqFail/t# Bogus::Pass tests use strict; use File::Spec 99999.9; plan tests => 1 ; pass( "Passed this test" ); t000755000765000024 014423611161 17452 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-PrereqMiss01_Bogus.t100644000765000024 15214423611161 21334 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-PrereqMiss/t# Bogus::Pass tests use strict; use File::Spec 99999.9; plan tests => 1 ; pass( "Passed this test" ); Makefile.PL100644000765000024 54114423611161 21446 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-RequirePerl# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; require 7.000; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; t-Fail-LongOutput000755000765000024 014423611161 20036 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 35514423611161 21455 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Fail-LongOutputuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; Bogus000755000765000024 014423611161 17545 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Fail/libModule.pm100644000765000024 11314423611161 21443 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Fail/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 17547 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Hang/libModule.pm100644000765000024 11314423611161 21445 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Hang/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Makefile.PL100644000765000024 114614423611161 21435 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Harness-Fail# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; sub MY::test_via_harness { my ($self, $perl) = @_; return "\t\$(NOECHO) $perl -e " . $self->quote_literal(q{die q{Can't execute: ... open3: IO::Pipe: Can't spawn-NOWAIT: No such file or directory at C:/strawberry/perl/lib/TAP/Parser/Iterator/Process.pm line 154\n}}); } Makefile.PL100644000765000024 52014423611161 21470 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-NoOutput-die# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; Bogus000755000765000024 014423611161 17600 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Pass/libModule.pm100644000765000024 11314423611161 21476 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Pass/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Makefile.PL100644000765000024 52014423611161 21450 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Pass# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; t000755000765000024 014423611161 17547 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-RequirePerl01_Bogus.t100644000765000024 16114423611161 21431 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-RequirePerl/t# Bogus::Pass tests use strict; use Test::More; require 7.000; plan tests => 1 ; pass( "Passed this test" ); test.pl-PrereqFail000755000765000024 014423611161 20225 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpustest.pl100644000765000024 15214423611161 21657 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-PrereqFail# Bogus::Pass tests use strict; use File::Spec 99999.9; plan tests => 1 ; pass( "Passed this test" ); test.pl-PrereqMiss000755000765000024 014423611161 20265 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpustest.pl100644000765000024 20414423611161 21715 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-PrereqMiss# Bogus::Pass tests use strict; use Bogus::Module::Doesnt::Exist; use Test::More; plan tests => 1 ; pass( "Passed this test" ); Bogus000755000765000024 014423611161 17614 5ustar00garustaff000000000000CPAN-Reporter-1.2019/t/perl5lib-shadowShadow.pm100644000765000024 6714423611161 21502 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/perl5lib-shadow/Boguspackage Bogus::Shadow; $VERSION = 2.72; use strict; 1; NormalVersion.pm100644000765000024 6414423611161 21565 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/perl5lib/Boguspackage Bogus::NormalVersion; $VERSION = '1.00'; 1; Bogus000755000765000024 014423611161 17615 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-Fail/libModule.pm100644000765000024 11314423611161 21513 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-Fail/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 17617 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-Hang/libModule.pm100644000765000024 11314423611161 21515 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-Hang/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Makefile.PL100644000765000024 51514423611161 21534 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-PrereqMissOK# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => { 'Unavailable::Module' => 0 }, ); t000755000765000024 014423611161 17617 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-RequirePerl01_Bogus.t100644000765000024 14214423611161 21500 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-RequirePerl/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); custom-NoOutput-OK000755000765000024 014423611161 20220 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 76614423611161 21645 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/custom-NoOutput-OKuse strict; use Module::Build; my $class = Module::Build->subclass( class => 'Module::Build::Custom', code => <<'ENDSUB' ); sub ACTION_test { my $self = shift; require File::Spec; $self->run_perl_script(File::Spec->catfile(qw/test Tester.pl/)) or die "Tests no good!\n"; } ENDSUB $class->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; Makefile.PL100644000765000024 55214423611161 21645 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-PrereqFail# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile( 'PL_FILES' => { 'Die.PL' => 'impossible_file.pm' }, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => { 'File::Spec' => 9999.99, } ); Makefile.PL100644000765000024 55514423611161 21710 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-PrereqMiss# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile( 'PL_FILES' => { 'Die.PL' => 'impossible_file.pm' }, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => { 'Unavailable::Module' => 0, } ); t000755000765000024 014423611161 17564 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Harness-Fail01_Bogus.t100644000765000024 14214423611161 21445 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Harness-Fail/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; fail( "Failed this test" ); Makefile.PL100644000765000024 66614423611161 21717 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-MultipleMatch# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; package MY; sub postamble { return <<"HERE"; pure_all :: \t\$(FULLPERLRUN) report-pass HERE } report-pass100644000765000024 4514423611161 22116 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-MultipleMatchprint "\nAll tests successful.\n\n"; t000755000765000024 014423611161 17644 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-NoOutput-die01_Bogus.t100644000765000024 12714423611161 21530 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-NoOutput-die/t# Bogus::Pass tests use strict; use Test::More; use This::Module::Does::Not::Exist; Makefile.PL100644000765000024 52014423611161 21726 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-OSUnsupported# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; Makefile.PL100644000765000024 47614423611161 21536 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqPerl-OK# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => { 'perl' => 5, }, ); t000755000765000024 014423611161 17624 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Pass01_Bogus.t100644000765000024 14214423611161 21505 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Pass/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); t-test.pl-Fail-Pass000755000765000024 014423611161 20213 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpustest.pl100644000765000024 14214423611161 21644 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Fail-Pass# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); t-test.pl-Pass-Pass000755000765000024 014423611161 20246 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpustest.pl100644000765000024 14214423611161 21677 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Pass-Pass# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); test.pl-NoOutput-OK000755000765000024 014423611161 20277 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpustest.pl100644000765000024 4714423611161 21714 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-NoOutput-OK# Bogus::Pass tests use strict; exit; Build.PL100644000765000024 43514423611161 21643 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-PrereqFailuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', requires => { 'File::Spec' => 99999.9 } )->create_build_script; Build.PL100644000765000024 45214423611161 21702 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-PrereqMissuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', requires => { 'Bogus::Module::Doesnt::Exist' => 0, } )->create_build_script; Makefile.PL100644000765000024 64414423611161 21700 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-MIRequirePerl# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; die 'ERROR: perl: Version 5.00505 is installed, but we need version >= 5.999999'; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; Makefile.PL100644000765000024 55014423611161 22001 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-OSUnsupported# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; die "OS Unsupported"; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; t000755000765000024 014423611161 17704 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-PrereqMissOK01_Bogus.t100644000765000024 15214423611161 21566 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-PrereqMissOK/t# Bogus::Pass tests use strict; use File::Spec 99999.9; plan tests => 1 ; pass( "Passed this test" ); custom-NoOutput-NOK000755000765000024 014423611161 20336 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 76614423611161 21763 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/custom-NoOutput-NOKuse strict; use Module::Build; my $class = Module::Build->subclass( class => 'Module::Build::Custom', code => <<'ENDSUB' ); sub ACTION_test { my $self = shift; require File::Spec; $self->run_perl_script(File::Spec->catfile(qw/test Tester.pl/)) or die "Tests no good!\n"; } ENDSUB $class->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; t000755000765000024 014423611161 20014 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-PrereqFail01_Bogus.t100644000765000024 14214423611161 21675 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-PrereqFail/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); t000755000765000024 014423611161 20054 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-PrereqMiss01_Bogus.t100644000765000024 14214423611161 21735 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-PrereqMiss/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); Makefile.PL100644000765000024 54514423611161 22054 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-RequirePerl# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile( 'PL_FILES' => { 'Die.PL' => 'impossible_file.pm' }, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => { 'perl' => 5.999999, } ); t000755000765000024 014423611161 20060 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-MultipleMatch01_Bogus.t100644000765000024 14214423611161 21741 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-MultipleMatch/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; fail( "Failed this test" ); t000755000765000024 014423611161 20102 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-OSUnsupported01_Bogus.t100644000765000024 14114423611161 21762 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-OSUnsupported/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; BAIL_OUT "os unsupported"; Makefile.PL100644000765000024 47714423611161 21655 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqPerl-NOK# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => { 'perl' => 42, }, ); t000755000765000024 014423611161 17700 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqPerl-OK01_Bogus.t100644000765000024 14214423611161 21561 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqPerl-OK/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); Makefile.PL100644000765000024 52014423611161 21656 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-t# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; Build.PL100644000765000024 34514423611161 21631 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Fail-Passuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; Build.PL100644000765000024 34514423611161 21664 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Pass-Passuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; test.pl-NoOutput-NOK000755000765000024 014423611161 20415 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpustest.pl100644000765000024 5114423611161 22025 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-NoOutput-NOK# Bogus::Pass tests use strict; exit 1; Build.PL100644000765000024 34514423611161 21715 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-NoOutput-OKuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; ComputedVersion.pm100644000765000024 15014423611161 22131 0ustar00garustaff000000000000CPAN-Reporter-1.2019/t/perl5lib/Boguspackage Bogus::ComputedVersion; use Bogus::NormalVersion; $VERSION = $Bogus::NormalVersion::VERSION; 1; Bogus000755000765000024 014423611161 20304 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/NoTestDir/libModule.pm100644000765000024 11314423611161 22202 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/NoTestDir/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Makefile.PL100644000765000024 55114423611161 22135 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-ConfigRequires# Note: this file was auto-generated by Module::Build::Compat version 0.2808_01 use ExtUtils::MakeMaker; use Local::Config; WriteMakefile ( 'NAME' => 'Bogus::Module', 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {}, 'INSTALLDIRS' => 'site', 'EXE_FILES' => [], 'PL_FILES' => {} ) ; t000755000765000024 014423611161 20045 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-MIRequirePerl01_Bogus.t100644000765000024 14214423611161 21726 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-MIRequirePerl/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); PL-NoMakefileOrBuild000755000765000024 014423611161 20410 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 35614423611161 22030 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-NoMakefileOrBuilduse strict; use Module::Build; exit 0; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; t000755000765000024 014423611161 20152 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-OSUnsupported01_Bogus.t100644000765000024 14214423611161 22033 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-OSUnsupported/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); Bogus000755000765000024 014423611161 20217 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-Fail/libModule.pm100644000765000024 11314423611161 22115 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-Fail/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true t000755000765000024 014423611161 20221 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-RequirePerl01_Bogus.t100644000765000024 14214423611161 22102 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-RequirePerl/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); Bogus000755000765000024 014423611161 20231 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-BailOut/libModule.pm100644000765000024 11314423611161 22127 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-BailOut/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Makefile.PL100644000765000024 52014423611161 22125 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Fail-LongOutput# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; t-PrereqPerl-NOK-our000755000765000024 014423611161 20356 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 42614423611161 21774 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqPerl-NOK-ouruse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', requires => { 'perl' => 5.006, } )->create_build_script; t000755000765000024 014423611161 20016 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqPerl-NOK01_Bogus.t100644000765000024 22214423611161 21676 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqPerl-NOK/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; die "Future Perl not invented yet" if $] < 42; pass( "Passed this test" ); Build.PL100644000765000024 34514423611161 22033 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-NoOutput-NOKuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; test.pl-OSUnsupported000755000765000024 014423611161 20765 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpustest.pl100644000765000024 14114423611161 22415 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-OSUnsupported# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; BAIL_OUT "OS Unsupported"; test.pl-PrereqPerl-OK000755000765000024 014423611161 20563 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpustest.pl100644000765000024 14214423611161 22214 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-PrereqPerl-OK# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); t000755000765000024 014423611161 20305 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-ConfigRequires01_Bogus.t100644000765000024 15214423611161 22167 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-ConfigRequires/t# Bogus::Pass tests use strict; use File::Spec 99999.9; plan tests => 1 ; pass( "Passed this test" ); PL-warn-OSUnsupported000755000765000024 014423611161 20654 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 41014423611161 22263 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-warn-OSUnsupporteduse strict; use Module::Build; warn "OS Unsupported" and exit 0; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; Makefile.PL100644000765000024 456614423611161 22345 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/custom-NoOutput-OK# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {}, ) ; package MY; require File::Spec; # copied from ExtUtils::MM_Unix, but test.pl is replaced with test/Tester.pl sub test { # --- Test and Installation Sections --- my $test_pl = File::Spec->catfile(qw/test Tester.pl/); my($self, %attribs) = @_; my $tests = $attribs{TESTS} || ''; if (!$tests && -d 't') { $tests = $self->find_tests; } # note: 'test.pl' name is also hardcoded in init_dirscan() my(@m); push(@m," TEST_VERBOSE=0 TEST_TYPE=test_\$(LINKTYPE) TEST_FILE = $test_pl TEST_FILES = $tests TESTDB_SW = -d testdb :: testdb_\$(LINKTYPE) test :: \$(TEST_TYPE) subdirs-test subdirs-test :: \$(NOECHO) \$(NOOP) "); foreach my $dir (@{ $self->{DIR} }) { my $test = $self->cd($dir, '$(MAKE) test $(PASTHRU)'); push @m, <{DIR}}; push(@m, "\n"); push(@m, "test_dynamic :: pure_all\n"); push(@m, $self->test_via_harness('$(FULLPERLRUN)', '$(TEST_FILES)')) if $tests; push(@m, $self->test_via_script('$(FULLPERLRUN)', '$(TEST_FILE)')) if -f $test_pl; push(@m, "\n"); push(@m, "testdb_dynamic :: pure_all\n"); push(@m, $self->test_via_script('$(FULLPERLRUN) $(TESTDB_SW)', '$(TEST_FILE)')); push(@m, "\n"); # Occasionally we may face this degenerate target: push @m, "test_ : test_dynamic\n\n"; if ($self->needs_linking()) { push(@m, "test_static :: pure_all \$(MAP_TARGET)\n"); push(@m, $self->test_via_harness('./$(MAP_TARGET)', '$(TEST_FILES)')) if $tests; push(@m, $self->test_via_script('./$(MAP_TARGET)', '$(TEST_FILE)')) if -f $test_pl; push(@m, "\n"); push(@m, "testdb_static :: pure_all \$(MAP_TARGET)\n"); push(@m, $self->test_via_script('./$(MAP_TARGET) $(TESTDB_SW)', '$(TEST_FILE)')); push(@m, "\n"); } else { push @m, "test_static :: test_dynamic\n"; push @m, "testdb_static :: testdb_dynamic\n"; } join("", @m); } t000755000765000024 014423611161 20301 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Fail-LongOutput01_Bogus.t100644000765000024 21414423611161 22162 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Fail-LongOutput/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; fail( "Failed this test" ); diag "A" x 50 for ( 0 .. 2000 ); # 100K Bogus000755000765000024 014423611161 20467 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-NoOutput/libModule.pm100644000765000024 11314423611161 22365 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-NoOutput/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true t-Pass000755000765000024 014423611161 20530 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-PassBuild.PL100644000765000024 34514423611161 22146 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Pass/t-Passuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; Build.PL100644000765000024 34514423611161 22403 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-OSUnsupporteduse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; Makefile.PL100644000765000024 51114423611161 22314 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-PrereqFail# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => { 'File::Spec' => 99999.9 }, ); Makefile.PL100644000765000024 52614423611161 22362 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-PrereqMiss# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => { 'Bogus::Module::Doesnt::Exist' => 0, }, ); test.pl-PrereqPerl-NOK000755000765000024 014423611161 20701 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpustest.pl100644000765000024 22214423611161 22331 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-PrereqPerl-NOK# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; die "Future Perl not invented yet" if $] < 42; pass( "Passed this test" ); Build.PL100644000765000024 42014423611161 22173 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-PrereqPerl-OKuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', requires => { perl => 5, } )->create_build_script; Bogus000755000765000024 014423611161 20630 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/NoTestFiles/libModule.pm100644000765000024 11314423611161 22526 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/NoTestFiles/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true MANIFEST.SKIP100644000765000024 110014423611161 22070 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-ConfigRequires# Avoid version control files. \bRCS\b \bCVS\b ,v$ \B\.svn\b \B\.cvsignore$ # Avoid Makemaker generated and utility files. \bMakefile$ \bblib \bMakeMaker-\d \bpm_to_blib$ \bblibdirs$ ^MANIFEST\.SKIP$ # Avoid Module::Build generated and utility files. \bBuild$ \bBuild.bat$ \b_build # Avoid Devel::Cover generated files \bcover_db # Avoid temp and backup files. ~$ \.tmp$ \.old$ \.bak$ \#$ \.# \.rej$ # Avoid OS-specific files/dirs # Mac OSX metadata \B\.DS_Store # Mac OSX SMB mount metadata files \B\._ # Avoid archives of this distribution \bBogus-Module-[\d\.\_]+ PL-ConfigRequiresError000755000765000024 014423611161 21054 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 47314423611161 22474 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-ConfigRequiresErroruse strict; use Module::Build; use Local::Config; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', dist_abstract => 'Bogus', create_makefile_pl => 'traditional', requires => { } )->create_build_script; MANIFEST100644000765000024 13514423611161 22324 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-ConfigRequiresErrorBuild.PL lib/Bogus/Module.pm Makefile.PL MANIFEST This list of files META.yml t/01_Bogus.t META.yml100644000765000024 52314423611161 22445 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-ConfigRequiresError--- name Bogus-Module # XXX INTENTIONAL ERROR not a proper hash key version: 0.01 author: - 'David A. Golden ' abstract: Bogus license: unknown configure_requires: Local::Config: 0 generated_by: Module::Build version 0.280801 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.2.html version: 1.2 Makefile.PL100644000765000024 456614423611161 22463 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/custom-NoOutput-NOK# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {}, ) ; package MY; require File::Spec; # copied from ExtUtils::MM_Unix, but test.pl is replaced with test/Tester.pl sub test { # --- Test and Installation Sections --- my $test_pl = File::Spec->catfile(qw/test Tester.pl/); my($self, %attribs) = @_; my $tests = $attribs{TESTS} || ''; if (!$tests && -d 't') { $tests = $self->find_tests; } # note: 'test.pl' name is also hardcoded in init_dirscan() my(@m); push(@m," TEST_VERBOSE=0 TEST_TYPE=test_\$(LINKTYPE) TEST_FILE = $test_pl TEST_FILES = $tests TESTDB_SW = -d testdb :: testdb_\$(LINKTYPE) test :: \$(TEST_TYPE) subdirs-test subdirs-test :: \$(NOECHO) \$(NOOP) "); foreach my $dir (@{ $self->{DIR} }) { my $test = $self->cd($dir, '$(MAKE) test $(PASTHRU)'); push @m, <{DIR}}; push(@m, "\n"); push(@m, "test_dynamic :: pure_all\n"); push(@m, $self->test_via_harness('$(FULLPERLRUN)', '$(TEST_FILES)')) if $tests; push(@m, $self->test_via_script('$(FULLPERLRUN)', '$(TEST_FILE)')) if -f $test_pl; push(@m, "\n"); push(@m, "testdb_dynamic :: pure_all\n"); push(@m, $self->test_via_script('$(FULLPERLRUN) $(TESTDB_SW)', '$(TEST_FILE)')); push(@m, "\n"); # Occasionally we may face this degenerate target: push @m, "test_ : test_dynamic\n\n"; if ($self->needs_linking()) { push(@m, "test_static :: pure_all \$(MAP_TARGET)\n"); push(@m, $self->test_via_harness('./$(MAP_TARGET)', '$(TEST_FILES)')) if $tests; push(@m, $self->test_via_script('./$(MAP_TARGET)', '$(TEST_FILE)')) if -f $test_pl; push(@m, "\n"); push(@m, "testdb_static :: pure_all \$(MAP_TARGET)\n"); push(@m, $self->test_via_script('./$(MAP_TARGET) $(TESTDB_SW)', '$(TEST_FILE)')); push(@m, "\n"); } else { push @m, "test_static :: test_dynamic\n"; push @m, "testdb_static :: testdb_dynamic\n"; } join("", @m); } Bogus000755000765000024 014423611161 20643 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-NoSupport/libModule.pm100644000765000024 11314423611161 22541 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-NoSupport/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true t-NoTestsButPrereqMiss000755000765000024 014423611161 21132 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 43714423611161 22552 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-NoTestsButPrereqMissuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', requires => { 'Bogus::Module::Doesnt::Exist' => 0, }, )->create_build_script; t-Recurse-Fail-test.pl000755000765000024 014423611161 20715 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpusBuild.PL100644000765000024 34514423611161 22333 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-test.pluse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; Makefile.PL100644000765000024 52014423611161 22302 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Fail-Pass# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; Makefile.PL100644000765000024 52014423611161 22335 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Pass-Pass# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; Makefile.PL100644000765000024 52014423611161 22366 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-NoOutput-OK# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; Build.PL100644000765000024 42114423611161 22312 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-PrereqPerl-NOKuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', requires => { perl => 42, } )->create_build_script; Bogus000755000765000024 014423611161 21014 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/NoTestTarget/libModule.pm100644000765000024 11314423611161 22712 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/NoTestTarget/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Makefile.PL100644000765000024 53214423611161 22502 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-NoMakefileOrBuild# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; exit 0; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; Bogus000755000765000024 014423611161 20713 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-NoSupport/libModule.pm100644000765000024 11314423611161 22611 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-NoSupport/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 20724 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqFail/libModule.pm100644000765000024 11314423611161 22622 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqFail/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 20764 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqMiss/libModule.pm100644000765000024 11314423611161 22662 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqMiss/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Makefile.PL100644000765000024 50214423611161 22445 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqPerl-NOK-our# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => { 'perl' => 5.006, }, ); t-Fail000755000765000024 014423611161 20703 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-tBuild.PL100644000765000024 34514423611161 22321 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-t/t-Failuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; t000755000765000024 014423611161 20456 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Fail-Pass01_Bogus.t100644000765000024 14214423611161 22337 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Fail-Pass/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; fail( "Failed this test" ); t000755000765000024 014423611161 20511 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Pass-Pass01_Bogus.t100644000765000024 14214423611161 22372 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Pass-Pass/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); Bogus000755000765000024 014423611161 20673 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-Fail/libModule.pm100644000765000024 11314423611161 22571 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-Fail/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Makefile.PL100644000765000024 52014423611161 22504 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-NoOutput-NOK# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; Bogus000755000765000024 014423611161 20726 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-Pass/libModule.pm100644000765000024 11314423611161 22624 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-Pass/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true t000755000765000024 014423611161 20653 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-NoMakefileOrBuild01_Bogus.t100644000765000024 14214423611161 22534 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-NoMakefileOrBuild/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); Bogus000755000765000024 014423611161 20774 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-PrereqFail/libModule.pm100644000765000024 11314423611161 22672 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-PrereqFail/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 21034 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-PrereqMiss/libModule.pm100644000765000024 11314423611161 22732 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-PrereqMiss/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Makefile.PL100644000765000024 56414423611161 22753 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-warn-OSUnsupported# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; warn "OS Unsupported" and exit 0; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; test000755000765000024 014423611161 21177 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/custom-NoOutput-OKTester.pl100644000765000024 4714423611161 23103 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/custom-NoOutput-OK/test# Bogus::Pass tests use strict; exit; t000755000765000024 014423611161 20621 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqPerl-NOK-our01_Bogus.t100644000765000024 22214423611161 22501 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqPerl-NOK-our/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; die "Future Perl not invented yet" if $] < 42; pass( "Passed this test" ); Makefile.PL100644000765000024 52014423611161 22617 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Pass/t-Pass# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; Bogus000755000765000024 014423611161 21131 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-RequirePerl/libModule.pm100644000765000024 11314423611161 23027 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-RequirePerl/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Makefile.PL100644000765000024 52014423611161 23054 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-OSUnsupported# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; Makefile.PL100644000765000024 47414423611161 22662 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-PrereqPerl-OK# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => { perl => 5, }, ); Makefile.PL100644000765000024 55114423611161 23147 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-ConfigRequiresError# Note: this file was auto-generated by Module::Build::Compat version 0.2808_01 use ExtUtils::MakeMaker; use Local::Config; WriteMakefile ( 'NAME' => 'Bogus::Module', 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {}, 'INSTALLDIRS' => 'site', 'EXE_FILES' => [], 'PL_FILES' => {} ) ; Bogus000755000765000024 014423611161 21201 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-RequirePerl/libModule.pm100644000765000024 11314423611161 23077 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-RequirePerl/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true t000755000765000024 014423611161 21117 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-warn-OSUnsupported01_Bogus.t100644000765000024 14214423611161 23000 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-warn-OSUnsupported/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); test000755000765000024 014423611161 21315 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/custom-NoOutput-NOKTester.pl100644000765000024 5114423611161 23214 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/custom-NoOutput-NOK/test# Bogus::Pass tests use strict; exit 1; Bogus000755000765000024 014423611161 21146 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Harness-Fail/libModule.pm100644000765000024 11314423611161 23044 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Harness-Fail/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 21226 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-NoOutput-die/libModule.pm100644000765000024 11314423611161 23124 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-NoOutput-die/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Makefile.PL100644000765000024 56614423611161 23233 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-NoTestsButPrereqMiss# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => { 'Bogus::Module::Doesnt::Exist' => 0 }, ) ; Makefile.PL100644000765000024 52014423611161 23004 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-test.pl# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; Bogus000755000765000024 014423611161 21206 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Pass/libModule.pm100644000765000024 11314423611161 23104 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Pass/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true t000755000765000024 014423611161 20773 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Pass/t-Pass01_Bogus.t100644000765000024 14214423611161 22654 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Pass/t-Pass/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); t-test.pl-Pass-NoOutput-OK000755000765000024 014423611161 21444 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpustest.pl100644000765000024 4714423611161 23061 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Pass-NoOutput-OK# Bogus::Pass tests use strict; exit; Makefile.PL100644000765000024 47514423611161 23001 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-PrereqPerl-NOK# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => { perl => 42, }, ); t000755000765000024 014423611161 21317 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-ConfigRequiresError01_Bogus.t100644000765000024 15214423611161 23201 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-ConfigRequiresError/t# Bogus::Pass tests use strict; use File::Spec 99999.9; plan tests => 1 ; pass( "Passed this test" ); Bogus000755000765000024 014423611161 21266 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-PrereqMissOK/libModule.pm100644000765000024 11314423611161 23164 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-PrereqMissOK/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 21376 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-PrereqFail/libModule.pm100644000765000024 11314423611161 23274 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-PrereqFail/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 21436 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-PrereqMiss/libModule.pm100644000765000024 11314423611161 23334 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-PrereqMiss/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 21442 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-MultipleMatch/libModule.pm100644000765000024 11314423611161 23340 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-MultipleMatch/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 21464 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-OSUnsupported/libModule.pm100644000765000024 11314423611161 23362 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-OSUnsupported/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 21262 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqPerl-OK/libModule.pm100644000765000024 11314423611161 23160 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqPerl-OK/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Makefile.PL100644000765000024 52014423611161 22772 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-t/t-Fail# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; test.pl-Pass000755000765000024 014423611161 21656 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Passtest.pl100644000765000024 14214423611161 23307 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Pass/test.pl-Pass# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); t-test.pl-Pass-NoOutput-NOK000755000765000024 014423611161 21562 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpustest.pl100644000765000024 5114423611161 23172 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Pass-NoOutput-NOK# Bogus::Pass tests use strict; exit 1; Build.PL100644000765000024 34514423611161 23062 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Pass-NoOutput-OKuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; MANIFEST.SKIP100644000765000024 110014423611161 23102 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-ConfigRequiresError# Avoid version control files. \bRCS\b \bCVS\b ,v$ \B\.svn\b \B\.cvsignore$ # Avoid Makemaker generated and utility files. \bMakefile$ \bblib \bMakeMaker-\d \bpm_to_blib$ \bblibdirs$ ^MANIFEST\.SKIP$ # Avoid Module::Build generated and utility files. \bBuild$ \bBuild.bat$ \b_build # Avoid Devel::Cover generated files \bcover_db # Avoid temp and backup files. ~$ \.tmp$ \.old$ \.bak$ \#$ \.# \.rej$ # Avoid OS-specific files/dirs # Mac OSX metadata \B\.DS_Store # Mac OSX SMB mount metadata files \B\._ # Avoid archives of this distribution \bBogus-Module-[\d\.\_]+ Bogus000755000765000024 014423611161 21427 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-MIRequirePerl/libModule.pm100644000765000024 11314423611161 23325 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-MIRequirePerl/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 21534 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-OSUnsupported/libModule.pm100644000765000024 11314423611161 23432 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-OSUnsupported/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 21603 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-RequirePerl/libModule.pm100644000765000024 11314423611161 23501 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/make-RequirePerl/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 21400 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqPerl-NOK/libModule.pm100644000765000024 11314423611161 23276 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqPerl-NOK/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 21414 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-t/libModule.pm100644000765000024 11314423611161 23312 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-t/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true t000755000765000024 014423611161 21146 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-t/t-Fail01_Bogus.t100644000765000024 14214423611161 23027 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-t/t-Fail/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; fail( "Failed this test" ); Build.PL100644000765000024 34514423611161 23274 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Pass/test.pl-Passuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; Build.PL100644000765000024 34514423611161 23200 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Pass-NoOutput-NOKuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; Bogus000755000765000024 014423611161 21667 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-ConfigRequires/libModule.pm100644000765000024 11314423611161 23565 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-ConfigRequires/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 21663 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Fail-LongOutput/libModule.pm100644000765000024 11314423611161 23561 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Fail-LongOutput/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true test.pl-Pass000755000765000024 014423611161 22064 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-ttest.pl100644000765000024 14214423611161 23515 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-t/test.pl-Pass# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); Bogus000755000765000024 014423611161 22045 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/custom-NoOutput-OK/libModule.pm100644000765000024 11314423611161 23743 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/custom-NoOutput-OK/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Build.PL100644000765000024 34514423611161 23502 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-t/test.pl-Passuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; t-Pass000755000765000024 014423611161 22064 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-test.plBuild.PL100644000765000024 34514423611161 23502 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-test.pl/t-Passuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; Makefile.PL100644000765000024 52014423611161 23533 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Pass-NoOutput-OK# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; Bogus000755000765000024 014423611161 22052 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-PrereqFail/libModule.pm100644000765000024 11314423611161 23750 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-PrereqFail/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 22112 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-PrereqMiss/libModule.pm100644000765000024 11314423611161 24010 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-PrereqMiss/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 22163 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/custom-NoOutput-NOK/libModule.pm100644000765000024 11314423611161 24061 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/custom-NoOutput-NOK/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Makefile.PL100644000765000024 52014423611161 23745 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Pass/test.pl-Pass# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; Bogus000755000765000024 014423611161 22040 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Fail-Pass/libModule.pm100644000765000024 11314423611161 23736 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Fail-Pass/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Makefile.PL100644000765000024 52014423611161 23651 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Pass-NoOutput-NOK# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; t000755000765000024 014423611161 21707 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Pass-NoOutput-OK01_Bogus.t100644000765000024 14214423611161 23570 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Pass-NoOutput-OK/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); Bogus000755000765000024 014423611161 22073 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Pass-Pass/libModule.pm100644000765000024 11314423611161 23771 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Pass-Pass/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 22124 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-NoOutput-OK/libModule.pm100644000765000024 11314423611161 24022 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-NoOutput-OK/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 22235 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-NoMakefileOrBuild/libModule.pm100644000765000024 11314423611161 24133 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-NoMakefileOrBuild/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 22203 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqPerl-NOK-our/libModule.pm100644000765000024 11714423611161 24105 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-PrereqPerl-NOK-our/lib/Boguspackage Bogus::Module; our $VERSION = "0.01"; 1; # modules must be true t000755000765000024 014423611161 22025 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Pass-NoOutput-NOK01_Bogus.t100644000765000024 14214423611161 23706 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Pass-NoOutput-NOK/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); Bogus000755000765000024 014423611161 22242 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-NoOutput-NOK/libModule.pm100644000765000024 11314423611161 24140 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-NoOutput-NOK/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 22501 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-warn-OSUnsupported/libModule.pm100644000765000024 11314423611161 24377 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-warn-OSUnsupported/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Makefile.PL100644000765000024 52014423611161 24153 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-t/test.pl-Pass# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; Makefile.PL100644000765000024 52014423611161 24153 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-test.pl/t-Pass# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; Bogus000755000765000024 014423611161 22355 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Pass/t-Pass/libModule.pm100644000765000024 11314423611161 24253 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Pass/t-Pass/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 22612 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-OSUnsupported/libModule.pm100644000765000024 11314423611161 24510 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-OSUnsupported/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 22410 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-PrereqPerl-OK/libModule.pm100644000765000024 11314423611161 24306 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-PrereqPerl-OK/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 22701 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-ConfigRequiresError/libModule.pm100644000765000024 11314423611161 24577 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/PL-ConfigRequiresError/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 22757 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-NoTestsButPrereqMiss/libModule.pm100644000765000024 11314423611161 24655 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-NoTestsButPrereqMiss/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 22542 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-test.pl/libModule.pm100644000765000024 11314423611161 24440 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-test.pl/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true t000755000765000024 014423611161 22327 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-test.pl/t-Pass01_Bogus.t100644000765000024 14214423611161 24210 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-test.pl/t-Pass/t# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; pass( "Passed this test" ); Bogus000755000765000024 014423611161 22526 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-PrereqPerl-NOK/libModule.pm100644000765000024 11314423611161 24424 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/test.pl-PrereqPerl-NOK/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 22530 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-t/t-Fail/libModule.pm100644000765000024 11314423611161 24426 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-t/t-Fail/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true test.pl-Fail000755000765000024 014423611161 23157 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-test.pltest.pl100644000765000024 14214423611161 24610 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-test.pl/test.pl-Fail# Bogus::Pass tests use strict; use Test::More; plan tests => 1 ; fail( "Failed this test" ); Build.PL100644000765000024 34514423611161 24575 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-test.pl/test.pl-Failuse strict; use Module::Build; Module::Build->new( module_name => 'Bogus::Module', dist_author => 'David A. Golden ', create_makefile_pl => 'traditional', )->create_build_script; Bogus000755000765000024 014423611161 23271 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Pass-NoOutput-OK/libModule.pm100644000765000024 11314423611161 25167 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Pass-NoOutput-OK/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Makefile.PL100644000765000024 52014423611161 25246 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-test.pl/test.pl-Fail# Note: this file was auto-generated by Module::Build::Compat version 0.03 use ExtUtils::MakeMaker; WriteMakefile ( 'PL_FILES' => {}, 'INSTALLDIRS' => 'site', 'NAME' => 'Bogus::Module', 'EXE_FILES' => [], 'VERSION_FROM' => 'lib/Bogus/Module.pm', 'PREREQ_PM' => {} ) ; Bogus000755000765000024 014423611161 23503 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Pass/test.pl-Pass/libModule.pm100644000765000024 11314423611161 25401 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Pass/test.pl-Pass/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 23407 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Pass-NoOutput-NOK/libModule.pm100644000765000024 11314423611161 25305 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-test.pl-Pass-NoOutput-NOK/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 23711 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-t/test.pl-Pass/libModule.pm100644000765000024 11314423611161 25607 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-t/test.pl-Pass/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 23711 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-test.pl/t-Pass/libModule.pm100644000765000024 11314423611161 25607 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-test.pl/t-Pass/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true Bogus000755000765000024 014423611161 25004 5ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-test.pl/test.pl-Fail/libModule.pm100644000765000024 11314423611161 26702 0ustar00garustaff000000000000CPAN-Reporter-1.2019/corpus/t-Recurse-Fail-test.pl/test.pl-Fail/lib/Boguspackage Bogus::Module; $VERSION = "0.01"; 1; # modules must be true