File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -410,6 +410,18 @@ Then use the tag you like and pick the symbol by its name.
410
410
# OUTPUT: «(&uri-escape &uri-unescape &uri_escape &uri_unescape)»
411
411
my &escape-uri = URI::Escape::EXPORT::DEFAULT::<&uri_escape>;
412
412
413
+ Be careful I < not > to put C < sub EXPORT > after L « C < unit > declarator|/syntax/unit» .
414
+ If you do so, it'll become just a sub inside your package, rather than the special
415
+ export sub:
416
+
417
+ unit module Bar;
418
+ sub EXPORT { %(Foo => &say) } # WRONG!!! Sub is scoped wrong
419
+
420
+ # ---------
421
+
422
+ sub EXPORT { %(Foo => &say) } # RIGHT!!! Sub is outside the module
423
+ unit module Bar;
424
+
413
425
= head2 Finding Modules
414
426
415
427
It is up to the module installer to know where C < compunit > expects modules to
You can’t perform that action at this time.
0 commit comments