Skip to content

Commit 8ae7aed

Browse files
committed
perlhacktips: Clarify, add example
This makes it clearer with an example about symbols whose names begin with an underscore It also adds a missing C<> mark-up
1 parent ca526f4 commit 8ae7aed

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

pod/perlhacktips.pod

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -371,8 +371,13 @@ It's best then to:
371371
=item B<Don't begin a file-level symbol name with an underscore>; (I<e.g.>, don't
372372
use: C<_FOOBAR>)
373373

374-
It is fine to have a symbol in a function or block like C<_ref>,
375-
beginning with an underscore followed by a lowercase letter.
374+
It is fine to have a symbol in a function or block begin with an
375+
underscore followed by a lowercase letter, like
376+
377+
{
378+
int _ref;
379+
...
380+
}
376381

377382
=item B<Don't use two consecutive underscores in a symbol name>;
378383
(I<e.g.>, don't use C<FOO__BAR>)
@@ -623,7 +628,7 @@ Assuming one can dereference any type of pointer for any type of data
623628
long pony = *(long *)p; /* BAD */
624629

625630
Many platforms, quite rightly so, will give you a core dump instead of
626-
a pony if the p happens not to be correctly aligned.
631+
a pony if the C<p> happens not to be correctly aligned.
627632

628633
=item *
629634

0 commit comments

Comments
 (0)