Skip to content

Conversation

@mauke
Copy link
Contributor

@mauke mauke commented Mar 15, 2025

That is, turn

BEGIN {
    require Foo;
    Foo->import(...);
}

into

use Foo ...;

(Except for a few tests that did the require Config; Config->import dance without actually using %Config anywhere, so I just deleted the import code.)


  • This set of changes does not require a perldelta entry.

@jkeenan
Copy link
Contributor

jkeenan commented Mar 15, 2025

I vaguely recall that there was some rationale for the use of BEGIN/require/import in the past (as opposed to use). Does anyone recall what that was?

That is, turn

    BEGIN {
        require Foo;
        Foo->import(...);
    }

into

    use Foo ...;

(Except for a few tests that did the `require Config; Config->import`
dance without actually using `%Config` anywhere, so I just deleted the
import code.)
@mauke mauke force-pushed the fuse-require-import-use branch from da09e67 to 1e38102 Compare March 16, 2025 16:05
@mauke mauke merged commit 8b1b46c into Perl:blead Mar 19, 2025
33 checks passed
@mauke mauke deleted the fuse-require-import-use branch March 19, 2025 04:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants