summaryrefslogtreecommitdiff
path: root/pod
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.berkeley.edu>1999-09-22 15:41:30 -0400
committerGurusamy Sarathy <gsar@cpan.org>1999-09-23 06:44:42 +0000
commit17f4a12df9ef6ee2f0a77e96071b3f12999159f0 (patch)
tree8a8b13d7eda2a4df6ff788a2e607177efcfd5a5c /pod
parentde0d19685a431728abc301db6a7957ad399d5e5f (diff)
downloadperl-17f4a12df9ef6ee2f0a77e96071b3f12999159f0.tar.gz
change "#" to a comment starter in pack templates; "/" now
used for specifying counted types Message-ID: <19990922194130.A864@monk.mps.ohio-state.edu> Subject: [PATCH 5.005_61] Enable comments in pack()/unpack() templates p4raw-id: //depot/perl@4222
Diffstat (limited to 'pod')
-rw-r--r--pod/perldiag.pod8
-rw-r--r--pod/perlfunc.pod14
2 files changed, 13 insertions, 9 deletions
diff --git a/pod/perldiag.pod b/pod/perldiag.pod
index 607a410e38..551f0590aa 100644
--- a/pod/perldiag.pod
+++ b/pod/perldiag.pod
@@ -65,26 +65,26 @@ no useful value. See L<perlmod>.
(F) The '!' is allowed in pack() and unpack() only after certain types.
See L<perlfunc/pack>.
-=item # cannot take a count
+=item / cannot take a count
(F) You had an unpack template indicating a counted-length string,
but you have also specified an explicit size for the string.
See L<perlfunc/pack>.
-=item # must be followed by a, A or Z
+=item / must be followed by a, A or Z
(F) You had an unpack template indicating a counted-length string,
which must be followed by one of the letters a, A or Z
to indicate what sort of string is to be unpacked.
See L<perlfunc/pack>.
-=item # must be followed by a*, A* or Z*
+=item / must be followed by a*, A* or Z*
(F) You had an pack template indicating a counted-length string,
Currently the only things that can have their length counted are a*, A* or Z*.
See L<perlfunc/pack>.
-=item # must follow a numeric type
+=item / must follow a numeric type
(F) You had an unpack template that contained a '#',
but this did not follow some numeric unpack specification.
diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 230dcd5c5e..237a38ddf8 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -2809,9 +2809,9 @@ C<"P"> is C<undef>.
=item *
-The C<"#"> character allows packing and unpacking of strings where the
+The C<"/"> character allows packing and unpacking of strings where the
packed structure contains a byte count followed by the string itself.
-You write I<length-item>C<#>I<string-item>.
+You write I<length-item>C</>I<string-item>.
The I<length-item> can be any C<pack> template letter,
and describes how the length value is packed.
@@ -2823,9 +2823,9 @@ The I<string-item> must, at present, be C<"A*">, C<"a*"> or C<"Z*">.
For C<unpack> the length of the string is obtained from the I<length-item>,
but if you put in the '*' it will be ignored.
- unpack 'C#a', "\04Gurusamy"; gives 'Guru'
- unpack 'a3#A* A*', '007 Bond J '; gives (' Bond','J')
- pack 'n#a* w#a*','hello,','world'; gives "\000\006hello,\005world"
+ unpack 'C/a', "\04Gurusamy"; gives 'Guru'
+ unpack 'a3/A* A*', '007 Bond J '; gives (' Bond','J')
+ pack 'n/a* w/a*','hello,','world'; gives "\000\006hello,\005world"
The I<length-item> is not returned explicitly from C<unpack>.
@@ -2931,6 +2931,10 @@ could know where the bytes are going to or coming from. Therefore
C<pack> (and C<unpack>) handle their output and input as flat
sequences of bytes.
+=item *
+
+A comment in a TEMPLATE starts with C<#> and goes to the end of line.
+
=back
Examples: