diff -pruN 1.29-2/Changes 1.31-1/Changes
--- 1.29-2/Changes	2021-05-13 15:17:32.000000000 +0000
+++ 1.31-1/Changes	2025-08-11 18:07:44.000000000 +0000
@@ -1,5 +1,14 @@
 Revision history for Perl extension Test-Script
 
+1.31      2025-08-11 12:07:41 -0600
+  - Fix bug introduced in 1.30 where exports were not happening correctly
+    in legacy mode (gh#47)
+
+1.30      2025-08-04 14:01:25 -0600
+  - Documentation improvements (#42)
+  - Fix bug where implicit function export would happen regardless of which
+    functions were explicitly exported (gh#45, gh#46)
+
 1.29      2021-05-13 09:17:30 -0600
   - Production release identical to 1.28_01 release.
 
diff -pruN 1.29-2/INSTALL 1.31-1/INSTALL
--- 1.29-2/INSTALL	2021-05-13 15:17:32.000000000 +0000
+++ 1.31-1/INSTALL	2025-08-11 18:07:44.000000000 +0000
@@ -21,8 +21,11 @@ Alternatively, if your CPAN shell is set
 
 ## Manual installation
 
-As a last resort, you can manually install it. Download the tarball, untar it,
-install configure prerequisites (see below), then build it:
+As a last resort, you can manually install it. If you have not already
+downloaded the release tarball, you can find the download link on the module's
+MetaCPAN page: https://metacpan.org/pod/Test::Script
+
+Untar the tarball, install configure prerequisites (see below), then build it:
 
     % perl Makefile.PL
     % make && make test
diff -pruN 1.29-2/LICENSE 1.31-1/LICENSE
--- 1.29-2/LICENSE	2021-05-13 15:17:32.000000000 +0000
+++ 1.31-1/LICENSE	2025-08-11 18:07:44.000000000 +0000
@@ -1,4 +1,4 @@
-This software is copyright (c) 2006-2021 by Adam Kennedy.
+This software is copyright (c) 2006-2024 by Adam Kennedy.
 
 This is free software; you can redistribute it and/or modify it under
 the same terms as the Perl 5 programming language system itself.
@@ -12,7 +12,7 @@ b) the "Artistic License"
 
 --- The GNU General Public License, Version 1, February 1989 ---
 
-This software is Copyright (c) 2006-2021 by Adam Kennedy.
+This software is Copyright (c) 2006-2024 by Adam Kennedy.
 
 This is free software, licensed under:
 
@@ -272,7 +272,7 @@ That's all there is to it!
 
 --- The Artistic License 1.0 ---
 
-This software is Copyright (c) 2006-2021 by Adam Kennedy.
+This software is Copyright (c) 2006-2024 by Adam Kennedy.
 
 This is free software, licensed under:
 
@@ -292,21 +292,21 @@ Definitions:
 
   - "Package" refers to the collection of files distributed by the Copyright
     Holder, and derivatives of that collection of files created through
-    textual modification. 
+    textual modification.
   - "Standard Version" refers to such a Package if it has not been modified,
     or has been modified in accordance with the wishes of the Copyright
-    Holder. 
+    Holder.
   - "Copyright Holder" is whoever is named in the copyright or copyrights for
-    the package. 
+    the package.
   - "You" is you, if you're thinking about copying or distributing this Package.
   - "Reasonable copying fee" is whatever you can justify on the basis of media
     cost, duplication charges, time of people involved, and so on. (You will
     not be required to justify it to the Copyright Holder, but only to the
-    computing community at large as a market that must bear the fee.) 
+    computing community at large as a market that must bear the fee.)
   - "Freely Available" means that no fee is charged for the item itself, though
     there may be fees involved in handling the item. It also means that
     recipients of the item may redistribute it under the same conditions they
-    received it. 
+    received it.
 
 1. You may make and give away verbatim copies of the source form of the
 Standard Version of this Package without restriction, provided that you
@@ -373,7 +373,7 @@ products derived from this software with
 
 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
 WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
-MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 
 The End
 
diff -pruN 1.29-2/MANIFEST 1.31-1/MANIFEST
--- 1.29-2/MANIFEST	2021-05-13 15:17:32.000000000 +0000
+++ 1.31-1/MANIFEST	2025-08-11 18:07:44.000000000 +0000
@@ -1,4 +1,4 @@
-# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.017.
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.033.
 Changes
 INSTALL
 LICENSE
@@ -22,8 +22,11 @@ t/bin/stdin.pl
 t/bin/stdin.txt
 t/bin/taint.pl
 t/bin/warnon.pl
+t/bug_gh45.t
+t/bug_gh45__default.t
 t/bug_gh9.t
 t/test_script__exports.t
+t/test_script__exports__gh47.t
 t/test_script__fails.t
 t/test_script__import.t
 t/test_script__program_runs.t
diff -pruN 1.29-2/META.json 1.31-1/META.json
--- 1.29-2/META.json	2021-05-13 15:17:32.000000000 +0000
+++ 1.31-1/META.json	2025-08-11 18:07:44.000000000 +0000
@@ -5,7 +5,7 @@
       "Adam Kennedy"
    ],
    "dynamic_config" : 0,
-   "generated_by" : "Dist::Zilla version 6.017, CPAN::Meta::Converter version 2.150010",
+   "generated_by" : "Dist::Zilla version 6.033, CPAN::Meta::Converter version 2.150010",
    "license" : [
       "perl_5"
    ],
@@ -22,6 +22,16 @@
          }
       },
       "develop" : {
+         "recommends" : {
+            "Dist::Zilla::Plugin::Author::Plicease::Thanks" : "0",
+            "Dist::Zilla::Plugin::Author::Plicease::Upload" : "0",
+            "Dist::Zilla::Plugin::MetaProvides::Package" : "0",
+            "Dist::Zilla::Plugin::Prereqs" : "0",
+            "Dist::Zilla::Plugin::PruneFiles" : "0",
+            "Dist::Zilla::Plugin::RemovePrereqs" : "0",
+            "Dist::Zilla::PluginBundle::Author::Plicease" : "2.79",
+            "Software::License::Perl_5" : "0"
+         },
          "requires" : {
             "FindBin" : "0",
             "Test::EOL" : "0",
@@ -48,7 +58,7 @@
       },
       "test" : {
          "requires" : {
-            "Test2::V0" : "0.000060",
+            "Test2::V0" : "0.000121",
             "perl" : "5.008001"
          }
       }
@@ -56,7 +66,7 @@
    "provides" : {
       "Test::Script" : {
          "file" : "lib/Test/Script.pm",
-         "version" : "1.29"
+         "version" : "1.31"
       }
    },
    "release_status" : "stable",
@@ -71,7 +81,7 @@
          "web" : "https://github.com/uperl/Test-Script"
       }
    },
-   "version" : "1.29",
+   "version" : "1.31",
    "x_contributors" : [
       "Adam Kennedy",
       "Graham Ollis <plicease@cpan.org>",
@@ -79,8 +89,8 @@
       "Chris White <cxw@cpan.org>",
       "John Karr (BRAINBUZ)"
    ],
-   "x_generated_by_perl" : "v5.33.9",
-   "x_serialization_backend" : "Cpanel::JSON::XS version 4.26",
+   "x_generated_by_perl" : "v5.36.0",
+   "x_serialization_backend" : "Cpanel::JSON::XS version 4.32",
    "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later",
    "x_use_unsafe_inc" : 0
 }
diff -pruN 1.29-2/META.yml 1.31-1/META.yml
--- 1.29-2/META.yml	2021-05-13 15:17:32.000000000 +0000
+++ 1.31-1/META.yml	2025-08-11 18:07:44.000000000 +0000
@@ -4,13 +4,13 @@ author:
   - 'Graham Ollis <plicease@cpan.org>'
   - 'Adam Kennedy'
 build_requires:
-  Test2::V0: '0.000060'
+  Test2::V0: '0.000121'
   perl: '5.008001'
 configure_requires:
   ExtUtils::MakeMaker: '0'
   perl: '5.008001'
 dynamic_config: 0
-generated_by: 'Dist::Zilla version 6.017, CPAN::Meta::Converter version 2.150010'
+generated_by: 'Dist::Zilla version 6.033, CPAN::Meta::Converter version 2.150010'
 license: perl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -19,7 +19,7 @@ name: Test-Script
 provides:
   Test::Script:
     file: lib/Test/Script.pm
-    version: '1.29'
+    version: '1.31'
 requires:
   Capture::Tiny: '0'
   File::Spec: '0.80'
@@ -32,14 +32,14 @@ resources:
   bugtracker: https://github.com/uperl/Test-Script/issues
   homepage: https://metacpan.org/pod/Test::Script
   repository: git://github.com/uperl/Test-Script.git
-version: '1.29'
+version: '1.31'
 x_contributors:
   - 'Adam Kennedy'
   - 'Graham Ollis <plicease@cpan.org>'
   - 'Brendan Byrd'
   - 'Chris White <cxw@cpan.org>'
   - 'John Karr (BRAINBUZ)'
-x_generated_by_perl: v5.33.9
+x_generated_by_perl: v5.36.0
 x_serialization_backend: 'YAML::Tiny version 1.73'
 x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later'
 x_use_unsafe_inc: 0
diff -pruN 1.29-2/Makefile.PL 1.31-1/Makefile.PL
--- 1.29-2/Makefile.PL	2021-05-13 15:17:32.000000000 +0000
+++ 1.31-1/Makefile.PL	2025-08-11 18:07:44.000000000 +0000
@@ -5,7 +5,7 @@ BEGIN {
     exit;
   }
 }
-# This file was automatically generated by Dist::Zilla::Plugin::Author::Plicease::MakeMaker v2.63.
+# This file was automatically generated by Dist::Zilla::Plugin::Author::Plicease::MakeMaker v2.79.
 use strict;
 use warnings;
 use 5.008001;
@@ -33,9 +33,9 @@ my %WriteMakefileArgs = (
     "Text::ParseWords" => 0
   },
   "TEST_REQUIRES" => {
-    "Test2::V0" => "0.000060"
+    "Test2::V0" => "0.000121"
   },
-  "VERSION" => "1.29",
+  "VERSION" => "1.31",
   "test"    => {
     "TESTS" => "t/*.t"
   }
@@ -47,7 +47,7 @@ my %FallbackPrereqs = (
   "IO::Handle"       => 0,
   "Probe::Perl"      => "0.01",
   "Test2::API"       => "1.302015",
-  "Test2::V0"        => "0.000060",
+  "Test2::V0"        => "0.000121",
   "Text::ParseWords" => 0
 );
 
diff -pruN 1.29-2/README 1.31-1/README
--- 1.29-2/README	2021-05-13 15:17:32.000000000 +0000
+++ 1.31-1/README	2025-08-11 18:07:44.000000000 +0000
@@ -4,7 +4,7 @@ NAME
 
 VERSION
 
-    version 1.29
+    version 1.31
 
 SYNOPSIS
 
@@ -37,7 +37,7 @@ DESCRIPTION
 
     In doing so, it is hoped that Test::Script can become a module that you
     can safely make a dependency of all your modules, without risking that
-    your module won't on some platform because of the dependency.
+    your module won't install on some platform because of the dependency.
 
     Where a clash exists between wanting more functionality and maintaining
     platform safety, this module will err on the side of platform safety.
@@ -363,7 +363,7 @@ AUTHOR
 
 COPYRIGHT AND LICENSE
 
-    This software is copyright (c) 2006-2021 by Adam Kennedy.
+    This software is copyright (c) 2006-2024 by Adam Kennedy.
 
     This is free software; you can redistribute it and/or modify it under
     the same terms as the Perl 5 programming language system itself.
diff -pruN 1.29-2/debian/changelog 1.31-1/debian/changelog
--- 1.29-2/debian/changelog	2022-10-14 12:43:08.000000000 +0000
+++ 1.31-1/debian/changelog	2025-09-15 18:58:09.000000000 +0000
@@ -1,3 +1,19 @@
+libtest-script-perl (1.31-1) unstable; urgency=medium
+
+  * Team upload.
+
+  [ Debian Janitor ]
+  * Update standards version to 4.6.1, no changes needed.
+
+  [ gregor herrmann ]
+  * Import upstream version 1.31.
+  * Update years of upstream copyright.
+  * Declare compliance with Debian Policy 4.7.2.
+  * Remove «Rules-Requires-Root: no», which is the current default.
+  * Remove «Priority: optional», which is the current default.
+
+ -- gregor herrmann <gregoa@debian.org>  Mon, 15 Sep 2025 20:58:09 +0200
+
 libtest-script-perl (1.29-2) unstable; urgency=medium
 
   [ Debian Janitor ]
diff -pruN 1.29-2/debian/control 1.31-1/debian/control
--- 1.29-2/debian/control	2022-10-14 12:43:08.000000000 +0000
+++ 1.31-1/debian/control	2025-09-15 18:58:09.000000000 +0000
@@ -1,28 +1,30 @@
 Source: libtest-script-perl
+Standards-Version: 4.7.2
 Maintainer: Debian Perl Group <pkg-perl-maintainers@lists.alioth.debian.org>
-Uploaders: Vincent Danjean <vdanjean@debian.org>
+Uploaders:
+ Vincent Danjean <vdanjean@debian.org>,
 Section: perl
 Testsuite: autopkgtest-pkg-perl
-Priority: optional
-Build-Depends: debhelper-compat (= 13)
-Build-Depends-Indep: libcapture-tiny-perl <!nocheck>,
-                     libprobe-perl-perl <!nocheck>,
-                     libtest-simple-perl <!nocheck>,
-                     libtest2-suite-perl <!nocheck>,
-                     perl
-Standards-Version: 4.6.0
+Build-Depends:
+ debhelper-compat (= 13),
+Build-Depends-Indep:
+ libcapture-tiny-perl <!nocheck>,
+ libprobe-perl-perl <!nocheck>,
+ libtest-simple-perl <!nocheck>,
+ libtest2-suite-perl <!nocheck>,
+ perl,
 Vcs-Browser: https://salsa.debian.org/perl-team/modules/packages/libtest-script-perl
 Vcs-Git: https://salsa.debian.org/perl-team/modules/packages/libtest-script-perl.git
 Homepage: https://metacpan.org/release/Test-Script
-Rules-Requires-Root: no
 
 Package: libtest-script-perl
 Architecture: all
-Depends: ${misc:Depends},
-         ${perl:Depends},
-         libcapture-tiny-perl,
-         libprobe-perl-perl,
-         libtest-simple-perl
+Depends:
+ ${misc:Depends},
+ ${perl:Depends},
+ libcapture-tiny-perl,
+ libprobe-perl-perl,
+ libtest-simple-perl,
 Description: Perl test module for scripts
  Test::Script is a Perl module that provides a series of basic tests for those
  files usually found in the bin or scripts directory of your package. It aims
diff -pruN 1.29-2/debian/copyright 1.31-1/debian/copyright
--- 1.29-2/debian/copyright	2022-10-14 12:43:08.000000000 +0000
+++ 1.31-1/debian/copyright	2025-09-15 18:58:09.000000000 +0000
@@ -4,7 +4,7 @@ Upstream-Contact: Adam Kennedy <adamk@cp
 Source: https://metacpan.org/release/Test-Script
 
 Files: *
-Copyright: 2006-2021, Adam Kennedy <adamk@cpan.org>
+Copyright: 2006-2024, Adam Kennedy <adamk@cpan.org>
 License: Artistic or GPL-1+
 
 Files: debian/*
diff -pruN 1.29-2/dist.ini 1.31-1/dist.ini
--- 1.29-2/dist.ini	2021-05-13 15:17:32.000000000 +0000
+++ 1.31-1/dist.ini	2025-08-11 18:07:44.000000000 +0000
@@ -3,20 +3,16 @@ author           = Graham Ollis <pliceas
 author           = Adam Kennedy
 license          = Perl_5
 copyright_holder = Adam Kennedy
-copyright_year   = 2006-2021
-version          = 1.29
+copyright_year   = 2006-2024
+version          = 1.31
 
 [@Author::Plicease]
-:version      = 2.61
+:version      = 2.79
 release_tests = 1
 test2_v0      = 1
 github_user   = uperl
 
 workflow = linux
-workflow = macos
-workflow = windows
-workflow = cygwin
-workflow = msys2-mingw
 
 [RemovePrereqs]
 remove = strict
diff -pruN 1.29-2/lib/Test/Script.pm 1.31-1/lib/Test/Script.pm
--- 1.29-2/lib/Test/Script.pm	2021-05-13 15:17:32.000000000 +0000
+++ 1.31-1/lib/Test/Script.pm	2025-08-11 18:07:44.000000000 +0000
@@ -1,14 +1,14 @@
 package Test::Script;
 
 # ABSTRACT: Basic cross-platform tests for scripts
-our $VERSION = '1.29'; # VERSION
+our $VERSION = '1.31'; # VERSION
 
 
 use 5.008001;
 use strict;
 use warnings;
 use Carp qw( croak );
-use Exporter;
+use Exporter ();
 use File::Spec;
 use File::Spec::Unix;
 use Probe::Perl;
@@ -44,7 +44,7 @@ our @EXPORT  = qw{
 };
 
 sub import {
-  my $self = shift;
+  my $class = shift;
   my $pack = caller;
   if(defined $_[0] && $_[0] =~ /^(?:no_plan|skip_all|tests)$/)
   {
@@ -64,9 +64,14 @@ sub import {
       $ctx->hub->plan('NO PLAN');
     }
     $ctx->release;
+    foreach ( @EXPORT ) {
+      $class->export_to_level(1, $class, $_);
+    }
   }
-  foreach ( @EXPORT ) {
-    $self->export_to_level(1, $self, $_);
+  else
+  {
+    unshift @_, $class;
+    goto &Exporter::import;
   }
 }
 
@@ -504,7 +509,7 @@ Test::Script - Basic cross-platform test
 
 =head1 VERSION
 
-version 1.29
+version 1.31
 
 =head1 SYNOPSIS
 
@@ -536,7 +541,7 @@ considered unacceptable.
 
 In doing so, it is hoped that B<Test::Script> can become a module that
 you can safely make a dependency of all your modules, without risking that
-your module won't on some platform because of the dependency.
+your module won't install on some platform because of the dependency.
 
 Where a clash exists between wanting more functionality and maintaining
 platform safety, this module will err on the side of platform safety.
@@ -877,7 +882,7 @@ John Karr (BRAINBUZ)
 
 =head1 COPYRIGHT AND LICENSE
 
-This software is copyright (c) 2006-2021 by Adam Kennedy.
+This software is copyright (c) 2006-2024 by Adam Kennedy.
 
 This is free software; you can redistribute it and/or modify it under
 the same terms as the Perl 5 programming language system itself.
diff -pruN 1.29-2/t/bug_gh45.t 1.31-1/t/bug_gh45.t
--- 1.29-2/t/bug_gh45.t	1970-01-01 00:00:00.000000000 +0000
+++ 1.31-1/t/bug_gh45.t	2025-08-11 18:07:44.000000000 +0000
@@ -0,0 +1,90 @@
+use Test2::V0 -no_srand => 1;
+use Test::Script ();
+
+is(
+    \@Test::Script::EXPORT,
+    bag {
+        item $_ for qw(
+            script_compiles
+            script_compiles_ok
+            script_fails
+            script_runs
+            script_stdout_is
+            script_stdout_isnt
+            script_stdout_like
+            script_stdout_unlike
+            script_stderr_is
+            script_stderr_isnt
+            script_stderr_like
+            script_stderr_unlike
+            program_fails
+            program_runs
+            program_stdout_is
+            program_stdout_isnt
+            program_stdout_like
+            program_stdout_unlike
+            program_stderr_is
+            program_stderr_isnt
+            program_stderr_like
+            program_stderr_unlike
+        );
+        etc;
+    },
+    'the list of exports contains at least the functions that was defined when this test was created',
+);
+
+not_imported_ok(qw(
+            script_compiles
+            script_compiles_ok
+            script_fails
+            script_runs
+            script_stdout_is
+            script_stdout_isnt
+            script_stdout_like
+            script_stdout_unlike
+            script_stderr_is
+            script_stderr_isnt
+            script_stderr_like
+            script_stderr_unlike
+            program_fails
+            program_runs
+            program_stdout_is
+            program_stdout_isnt
+            program_stdout_like
+            program_stdout_unlike
+            program_stderr_is
+            program_stderr_isnt
+            program_stderr_like
+            program_stderr_unlike
+        ),
+);
+
+Test::Script->import('script_compiles', 'script_runs');
+
+imported_ok('script_compiles','script_runs');
+
+not_imported_ok(qw(
+            script_compiles_ok
+            script_fails
+            script_stdout_is
+            script_stdout_isnt
+            script_stdout_like
+            script_stdout_unlike
+            script_stderr_is
+            script_stderr_isnt
+            script_stderr_like
+            script_stderr_unlike
+            program_fails
+            program_runs
+            program_stdout_is
+            program_stdout_isnt
+            program_stdout_like
+            program_stdout_unlike
+            program_stderr_is
+            program_stderr_isnt
+            program_stderr_like
+            program_stderr_unlike
+        ),
+);
+
+done_testing;
diff -pruN 1.29-2/t/bug_gh45__default.t 1.31-1/t/bug_gh45__default.t
--- 1.29-2/t/bug_gh45__default.t	1970-01-01 00:00:00.000000000 +0000
+++ 1.31-1/t/bug_gh45__default.t	2025-08-11 18:07:44.000000000 +0000
@@ -0,0 +1,30 @@
+use Test2::V0 -no_srand => 1;
+use Test::Script;
+
+imported_ok(qw(
+            script_compiles
+            script_compiles_ok
+            script_fails
+            script_runs
+            script_stdout_is
+            script_stdout_isnt
+            script_stdout_like
+            script_stdout_unlike
+            script_stderr_is
+            script_stderr_isnt
+            script_stderr_like
+            script_stderr_unlike
+            program_fails
+            program_runs
+            program_stdout_is
+            program_stdout_isnt
+            program_stdout_like
+            program_stdout_unlike
+            program_stderr_is
+            program_stderr_isnt
+            program_stderr_like
+            program_stderr_unlike
+        ),
+);
+
+done_testing;
diff -pruN 1.29-2/t/test_script__exports__gh47.t 1.31-1/t/test_script__exports__gh47.t
--- 1.29-2/t/test_script__exports__gh47.t	1970-01-01 00:00:00.000000000 +0000
+++ 1.31-1/t/test_script__exports__gh47.t	2025-08-11 18:07:44.000000000 +0000
@@ -0,0 +1,31 @@
+use Test2::V0 -no_srand => 1;
+use Test::Script tests => 1;
+
+# replaces t/01_compile.t
+
+subtest 'expected imports' => sub {
+  imported_ok $_ for qw(
+    script_compiles
+    script_compiles_ok
+    script_runs
+    script_stdout_is
+    script_stdout_isnt
+    script_stdout_like
+    script_stdout_unlike
+    script_stderr_is
+    script_stderr_isnt
+    script_stderr_like
+    script_stderr_unlike
+    program_runs
+    program_stdout_is
+    program_stdout_isnt
+    program_stdout_like
+    program_stdout_unlike
+    program_stderr_is
+    program_stderr_isnt
+    program_stderr_like
+    program_stderr_unlike
+  );
+};
+
+done_testing;
