diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-24 16:33:59 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-24 16:33:59 +0000 |
commit | f35392ae6417fec0cce48333103123d63f364254 (patch) | |
tree | e7c82a32a06a225236fbf3f9966a943ed7c12f85 | |
parent | 899dc88a93c9f405bbb10a691d04fc8dc860485b (diff) | |
download | perl-f35392ae6417fec0cce48333103123d63f364254.tar.gz |
Spec the sv_pvprintify() a bit more.
p4raw-id: //depot/perl@10895
-rw-r--r-- | pod/perltodo.pod | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/pod/perltodo.pod b/pod/perltodo.pod index 5d280e6936..7625aa6049 100644 --- a/pod/perltodo.pod +++ b/pod/perltodo.pod @@ -28,12 +28,26 @@ always be set to true, but it needs to be set to false when F<utf8.pm> is being compiled. (To stop Perl trying to autoload the C<utf8> pragma...) -=head2 Create a char *sv_printify(sv, STRLEN *lenp, UV flags) function +=head2 Create a char *sv_printify(sv, STRLEN *lenp, UV flags) For displaying PVs with control characters, embedded nulls, and Unicode. This would be useful for printing warnings, or data and regex dumping, not_a_number(), and so on. +Requirements: should handle both byte and UTF8 strings. isPRINT() +characters printed as-is, character less than 256 as \xHH, Unicode +characters as \x{HHH}. + +Possible options, controlled by the flags: +- whitespace (other than ' ' of isPRINTF()) printed as-is +- use isPRINT_LC() instead of isPRINT() +- print control characters like this: "\cA" +- print control characters like this: "^A" +- non-printables printed as '.' instead of \xHH +- print the \OOO instead of \xHH +- have a maximum length for the produced string (read it from *lenp) +- append a "..." to the produced string if the maximum length is exceeded + =head2 Autoload byte.pm When the lexer sees, for instance, C<bytes::length>, it should |