diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-18 23:10:22 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-06-18 23:10:22 +0000 |
commit | 0562c0e3630958db13a0e70db1b90c05d3fee158 (patch) | |
tree | 1a5b95a275a54726c55fe1717da9fc42397bc61b | |
parent | 21071c796cea8a77ac4a8e55245edbb3cf3a6f20 (diff) | |
download | perl-0562c0e3630958db13a0e70db1b90c05d3fee158.tar.gz |
Document the need for sv_printify().
Document that 'use utf8' has been considered.
(An unfinished, gcc 3.0 -Wall nit fix also slipped in, gack.)
p4raw-id: //depot/perl@10698
-rw-r--r-- | pod/perltodo.pod | 16 | ||||
-rw-r--r-- | universal.c | 5 |
2 files changed, 19 insertions, 2 deletions
diff --git a/pod/perltodo.pod b/pod/perltodo.pod index 3882498750..5d280e6936 100644 --- a/pod/perltodo.pod +++ b/pod/perltodo.pod @@ -28,6 +28,12 @@ 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 + +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. + =head2 Autoload byte.pm When the lexer sees, for instance, C<bytes::length>, it should @@ -770,3 +776,13 @@ done manually, with C<goto &whoami;>. (However, MJD has found that C<goto &whoami> introduces a performance penalty, so maybe there should be a way to do this after all: C<sub foo {START: ... goto START;> is better.) + +=head2 Make "use utf8" the default + +There is a patch available for this, search p5p archives for +the Subject "[EXPERIMENTAL PATCH] make unicode (utf8) default" +but this would be unacceptable because of backward compatibility: +scripts could not contain B<any legacy eight-bit data>. Also would +introduce a measurable slowdown of at least few percentages since all +regular expression operations would be done in full UTF-8. + diff --git a/universal.c b/universal.c index ca69243ca6..8b2044393b 100644 --- a/universal.c +++ b/universal.c @@ -303,9 +303,10 @@ XS(XS_UNIVERSAL_VERSION) sv_setnv(req, n); } - if (SvNV(req) > SvNV(sv)) + if (SvNV(req) > SvNV(sv)) { Perl_croak(aTHX_ "%s version %s required--this is only version %s", - HvNAME(pkg), SvPV(req,len), SvPV(sv,len)); + HvNAME(pkg), SvPV_nolen(req), SvPV_nolen(sv,len)); + } } finish: |