Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't treat locally defined subs as importable symbols #110

Merged
merged 1 commit into from
Jun 29, 2024
Merged

Conversation

oalders
Copy link
Member

@oalders oalders commented Jun 29, 2024

Otherwise we have the issue where:

package Round;
use parent 'Exporter';

use strict;
use warnings;

use Math::Round qw(nearest);
our @EXPORT_OK = qw(round);

sub round {
    my ( $number, $places ) = @_;
    return nearest( 10**-$places, $number );
}

1;

gets an import changed to:

use Math::Round qw( nearest round );

Fixes #109

Copy link

codecov bot commented Jun 29, 2024

Codecov Report

Attention: Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.

Project coverage is 87.41%. Comparing base (6fb98fa) to head (f0b7156).

Current head f0b7156 differs from pull request most recent head d1b155a

Please upload reports for the commit d1b155a to get more accurate results.

Files Patch % Lines
lib/App/perlimports/Include.pm 50.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #110      +/-   ##
==========================================
+ Coverage   87.29%   87.41%   +0.11%     
==========================================
  Files           9        9              
  Lines         866      866              
  Branches      196      196              
==========================================
+ Hits          756      757       +1     
  Misses         82       82              
+ Partials       28       27       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Otherwise we have the issue where:

package Round;
use parent 'Exporter';

use strict;
use warnings;

use Math::Round qw(nearest);
our @EXPORT_OK = qw(round);

sub round {
    my ( $number, $places ) = @_;
    return nearest( 10**-$places, $number );
}

1;

gets an import changed to:

use Math::Round qw( nearest round );
@oalders oalders merged commit b22c2c0 into main Jun 29, 2024
25 checks passed
@oalders oalders deleted the oalders/order branch June 29, 2024 19:30
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.

Incorrect imports when package exports method by same name as local method.
1 participant