summaryrefslogtreecommitdiff
path: root/pod/perllol.pod
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2016-03-11 14:43:33 -0700
committerKarl Williamson <khw@cpan.org>2016-03-11 14:49:26 -0700
commite46aa1ddb7d58d270bbc45cef016b0577cfdecaa (patch)
tree2c2bae16536e85b2786e98dda62579ffa5c90c27 /pod/perllol.pod
parentfa6c7d00a8b0cf48c0f78066f87065cfb43d601b (diff)
downloadperl-e46aa1ddb7d58d270bbc45cef016b0577cfdecaa.tar.gz
Fix various pod errors.
Mostly these are too long verbatim lines.
Diffstat (limited to 'pod/perllol.pod')
-rw-r--r--pod/perllol.pod29
1 files changed, 16 insertions, 13 deletions
diff --git a/pod/perllol.pod b/pod/perllol.pod
index b35a0febb3..7eee1ec9a1 100644
--- a/pod/perllol.pod
+++ b/pod/perllol.pod
@@ -200,13 +200,14 @@ but not earlier, you should place a prominent
directive at the top of the file that needs it. That way when somebody
tries to run the new code under an old perl, rather than getting an error like
- Type of arg 1 to push must be array (not array element) at /tmp/a line 8, near ""betty";"
+ Type of arg 1 to push must be array (not array element) at /tmp/a
+ line 8, near ""betty";"
Execution of /tmp/a aborted due to compilation errors.
they'll be politely informed that
- Perl v5.14.0 required--this is only v5.12.3, stopped at /tmp/a line 1.
- BEGIN failed--compilation aborted at /tmp/a line 1.
+ Perl v5.14.0 required--this is only v5.12.3, stopped at /tmp/a line 1.
+ BEGIN failed--compilation aborted at /tmp/a line 1.
=head2 Access and Printing
@@ -270,26 +271,28 @@ you might look at the standard L<Dumpvalue> or L<Data::Dumper> modules.
The former is what the Perl debugger uses, while the latter generates
parsable Perl code. For example:
- use v5.14; # using the + prototype, new to v5.14
+ use v5.14; # using the + prototype, new to v5.14
- sub show(+) {
+ sub show(+) {
require Dumpvalue;
state $prettily = new Dumpvalue::
tick => q("),
- compactDump => 1, # comment these two lines out
- veryCompact => 1, # if you want a bigger dump
+ compactDump => 1, # comment these two lines
+ # out
+ veryCompact => 1, # if you want a bigger
+ # dump
;
dumpValue $prettily @_;
- }
+ }
- # Assign a list of array references to an array.
- my @AoA = (
+ # Assign a list of array references to an array.
+ my @AoA = (
[ "fred", "barney" ],
[ "george", "jane", "elroy" ],
[ "homer", "marge", "bart" ],
- );
- push $AoA[0], "wilma", "betty";
- show @AoA;
+ );
+ push $AoA[0], "wilma", "betty";
+ show @AoA;
will print out: