Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[glossary.pod] Fixed a couple of errors spotted by raiph++
Fixed two typos and s/native/builtin/ in an example, because there are
no native 'str's.
  • Loading branch information
ShimmerFairy committed Jul 21, 2012
1 parent 75dc961 commit 5867c7b
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/glossary.pod
Expand Up @@ -43,12 +43,12 @@ I<autothreading>.
An I<instance> of a class is also called an I<object> in some other
programming languages. It has a storage for attributes, and is often
the return value of a class to a method called C<new>, or a literal.
the return value of a call to a method called C<new>, or a literal.
Instances of most types are defined to be C<True>
i.e., C<defined($instance)> is C<True>.
my Str $str = "hello"; ## this is with native types. Str
my Str $str = "hello"; ## this is with builtin types, e.g. Str
if defined($str) {
say "Oh, yeah. I'm defined.";
} else {
Expand Down Expand Up @@ -103,11 +103,11 @@ Examples of lvalues:
Examples of things that are not lvalues
3 # literal s
constant x = 3; # constants
has $.attrib; # attributes; you can only assign to $!attrib
sub f { }; f(); # "normal" subs are not writable
sub f($x) { $x = 3 }; # error - parameters are read-only by default
3 # literals
constant x = 3; # constants
has $.attrib; # attributes; you can only assign to $!attrib
sub f { }; f(); # "normal" subs are not writable
sub f($x) { $x = 3 }; # error - parameters are read-only by default
=head1 Slurpy
Expand Down

0 comments on commit 5867c7b

Please sign in to comment.