Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Spec a useful return value for "require"

This is inspired by some repetitive code being written for File::Spec, see
http://irclog.perlgeek.de/perl6/2012-09-14#i_5986754 .
  • Loading branch information...
commit d46a8abe6b9b4988b1bd31d19fae88fb36144ab1 1 parent 22f12ce
Stefan O'Rear sorear authored
Showing with 6 additions and 2 deletions.
  1. +6 −2 S11-modules.pod
8 S11-modules.pod
View
@@ -13,8 +13,8 @@ Synopsis 11: Modules
Created: 27 Oct 2004
- Last Modified: 04 Sep 2012
- Version: 37
+ Last Modified: 14 Sep 2012
+ Version: 38
=head1 Overview
@@ -280,6 +280,10 @@ This means something like:
exist; this differs from C<.import_alias>, which requires that the
imported symbols I<not> already exist in the target scope.)
+Additionally, the C<require> expression evaluates to the value which is
+installed as the alias, so that C<(require Foo::Bar).new> and similar
+expressions do the most useful thing.
+
Alternately, a filename may be mentioned directly, which installs a
package that is effectively anonymous to the current lexical scope,
and may only be accessed by whatever global names the module installs:
Please sign in to comment.
Something went wrong with that request. Please try again.