Skip to content
This repository
Browse code

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
sorear authored September 14, 2012

Showing 1 changed file with 6 additions and 2 deletions. Show diff stats Hide diff stats

  1. 8  S11-modules.pod
8  S11-modules.pod
Source Rendered
@@ -13,8 +13,8 @@ Synopsis 11: Modules
13 13
 
14 14
     Created: 27 Oct 2004
15 15
 
16  
-    Last Modified: 04 Sep 2012
17  
-    Version: 37
  16
+    Last Modified: 14 Sep 2012
  17
+    Version: 38
18 18
 
19 19
 =head1 Overview
20 20
 
@@ -280,6 +280,10 @@ This means something like:
280 280
 exist; this differs from C<.import_alias>, which requires that the
281 281
 imported symbols I<not> already exist in the target scope.)
282 282
 
  283
+Additionally, the C<require> expression evaluates to the value which is
  284
+installed as the alias, so that C<(require Foo::Bar).new> and similar
  285
+expressions do the most useful thing.
  286
+
283 287
 Alternately, a filename may be mentioned directly, which installs a
284 288
 package that is effectively anonymous to the current lexical scope,
285 289
 and may only be accessed by whatever global names the module installs:

0 notes on commit d46a8ab

Please sign in to comment.
Something went wrong with that request. Please try again.