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
"if" pragma POD addition for modules with an empty import list #15950
Comments
From kencotterill@netspace.net.auThis relates to if.pm (version: 0.0606). The current documentation refers to loading modules It doesn't mention using an empty import list This patch adds a few lines to the POD to Inline Patch--- if.pm 2017-04-12 08:26:15.000000000 +1000
+++ if-new.pm 2017-04-12 09:31:05.000000000 +1000
@@ -50,6 +50,15 @@
If you don't use the fat comma (eg you don't have any ARGUMENTS),
then you'll need to quote the MODULE.
+If you wanted ARGUMENTS to be an empty list, i.e. have the effect of:
+
+ use MODULE ();
+
+you can't do this with the C<if> pragma; however, you can achieve
+exactly this effect, at compile time, with:
+
+ BEGIN { require MODULE if CONDITION }
+
=head2 EXAMPLES
The following line is taken from the testsuite for L<File::Map>: |
From @khwilliamsonOn Wed, 12 Apr 2017 20:21:58 -0700, kencotterill@netspace.net.au wrote:
Thanks, I'll look into this for 5.27
-- |
The RT System itself - Status changed from 'new' to 'open' |
From @jkeenanOn Thu, 11 May 2017 15:25:50 GMT, khw wrote:
Karl, would you like to move forward with the discussion of this request? Thank you very much. -- |
From @khwilliamsonThanks, applied as It makes it easier on us if you attach the patch to the ticket, instead of inlining it. |
@khwilliamson - Status changed from 'open' to 'pending release' |
From @khwilliamsonThank you for filing this report. You have helped make Perl better. With the release yesterday of Perl 5.28.0, this and 185 other issues have been Perl 5.28.0 may be downloaded via: If you find that the problem persists, feel free to reopen this ticket. |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#131142 (status was 'resolved')
Searchable as RT131142$
The text was updated successfully, but these errors were encountered: