Skip to content

Commit

Permalink
Minor typo fixes from review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
leonerd committed Sep 23, 2022
1 parent a6c1ef0 commit 2b16c8c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions rfcs/rfc0022.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A coherent API for metaprogramming tasks; that is, code which is aware of its ow

## Motivation

As a dynamic language, programs written in Perl have the ability to be aware of the structure of their own code. Functions, packages, variables, and other constructions can be obtained or manipulated by name, While the techniques can certainly be over-used, it is a useful and necessary ability of what it means to be a "dynamic language", and where appropriate these kinds of techniques should be supported and encouraged.
As a dynamic language, programs written in Perl have the ability to be aware of the structure of their own code. Functions, packages, variables, and other constructions can be obtained or manipulated by name. While the techniques can certainly be over-used, it is a useful and necessary ability of what it means to be a "dynamic language", and where appropriate these kinds of techniques should be supported and encouraged.

Originally, Perl provided some abilities in the form of operations on glob references. Gradually over time, authors have required more abilities than this and increasingly have used a variety of CPAN modules to extend these abilities. As many of the operations provided ought to be considered fundamental language abilities for a dynamic language, it would be better if these were provided by core Perl itself.

Expand Down Expand Up @@ -83,7 +83,7 @@ Some less common functions that may still be useful in some situations. These fu
$metavar = meta::get_variable($varref);
```

Given a reference to a package variable, returns a meta-variable object instance to represent it. If `$subref` is not a SCALAR, ARRAY or HASH reference, an exception is thrown.
Given a reference to a package variable, returns a meta-variable object instance to represent it. If `$varref` is not a SCALAR, ARRAY or HASH reference, an exception is thrown.

*Note:* It is currently unspecified what happens if the reference refers to a lexical or anonymous variable, rather than a package one. This RFC does not specify any useful behaviour for such instances, but it's possible that future abilities may be added that become useful on lexical variables or anonymous containers.

Expand Down Expand Up @@ -169,7 +169,7 @@ Removes a symbol. Nothing is returned.
@metasymbols = $metapackage->list_symbols($filter)
```

Returns a list of symbols in the given package, in no particular order. (And in particular, we make no guarantees about the order of the results as compared the order of the source code which declared it).
Returns a list of symbols in the given package, in no particular order. (And in particular, we make no guarantees about the order of the results as compared to the order of the source code which declared it).

TODO: Define what the filters look like. Need to be able to select scalar/array/hash/code as well as sub-stashes. Actually, do we need sub-stashes if we have `list_packages`?

Expand Down

0 comments on commit 2b16c8c

Please sign in to comment.