You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While it might be OK by default to add empty import () statement to use statements that do not already import something so that they are future proofed against new default-exports it still adds a lot of noise and in bigger code bases that are under control by the same org it doesn't gains much value.
That's why I'd like to request a new option to opt-out of adding such "empty import statements" (or however they are called).
E.g., as of now the following line:
use Foo::Bar;
Always becomes
use Foo::Bar ();
With the newly proposed option that line should stay the same, at least if Foo::Bar is used at all.
Thanks for your consideration and for this module in general!
The text was updated successfully, but these errors were encountered:
Thanks for your reply. The issue here is that we do not want to unconditionally ignore modules, just avoid adding the empty import by default for everything which is really not the same thing as ignoring them FWICT.
Can you give me some concrete examples of what perlimports is doing vs what you think it should be doing? Maybe a couple of diffs to illustrate the problem.
While it might be OK by default to add empty import
()
statement to use statements that do not already import something so that they are future proofed against new default-exports it still adds a lot of noise and in bigger code bases that are under control by the same org it doesn't gains much value.That's why I'd like to request a new option to opt-out of adding such "empty import statements" (or however they are called).
E.g., as of now the following line:
use Foo::Bar;
Always becomes
use Foo::Bar ();
With the newly proposed option that line should stay the same, at least if
Foo::Bar
is used at all.Thanks for your consideration and for this module in general!
The text was updated successfully, but these errors were encountered: