summaryrefslogtreecommitdiff
path: root/pod/perltodo.pod
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2007-11-24 11:40:28 +0000
committerNicholas Clark <nick@ccl4.org>2007-11-24 11:40:28 +0000
commit16815324371ba58b10695db6d57346a07b27a2e5 (patch)
tree6a590229d5bcac78a1445130b5f61387a28f60fe /pod/perltodo.pod
parentb1233c72f2dabb53e03a3ecd66d79abc753b42e0 (diff)
downloadperl-16815324371ba58b10695db6d57346a07b27a2e5.tar.gz
Eliminating the duplicate logic in S_method_common() and
Perl_gv_fetchmethod_autoload() is clearly TODO. Move the paragraph "strcat(), strcpy(), strncat(), strncpy(), sprintf(), vsprintf()" to the section "Tasks that need a little C knowledge" as it doesn't need any XS knowledge. p4raw-id: //depot/perl@32478
Diffstat (limited to 'pod/perltodo.pod')
-rw-r--r--pod/perltodo.pod42
1 files changed, 31 insertions, 11 deletions
diff --git a/pod/perltodo.pod b/pod/perltodo.pod
index 5adc1fb268..63da3f961a 100644
--- a/pod/perltodo.pod
+++ b/pod/perltodo.pod
@@ -468,6 +468,18 @@ Jarkko notes that one can things morally equivalent to C<__FUNCTION__>
See L<http://www.codeproject.com/debug/extendedtrace.asp> if you feel like
making C<PERL_MEM_LOG> more useful on Win32.
+=head2 strcat(), strcpy(), strncat(), strncpy(), sprintf(), vsprintf()
+
+Maybe create a utility that checks after each libperl.a creation that
+none of the above (nor sprintf(), vsprintf(), or *SHUDDER* gets())
+ever creep back to libperl.a.
+
+ nm libperl.a | ./miniperl -alne '$o = $F[0] if /:$/; print "$o $F[1]" if $F[0] eq "U" && $F[1] =~ /^(?:strn?c(?:at|py)|v?sprintf|gets)$/'
+
+Note, of course, that this will only tell whether B<your> platform
+is using those naughty interfaces.
+
+
=head1 Tasks that need a knowledge of XS
These tasks would need C knowledge, and roughly the level of knowledge of
@@ -547,17 +559,6 @@ system() accepts a LIST syntax (and a PROGRAM LIST syntax) to avoid
running a shell. readpipe() (the function behind qx//) could be similarly
extended.
-=head2 strcat(), strcpy(), strncat(), strncpy(), sprintf(), vsprintf()
-
-Maybe create a utility that checks after each libperl.a creation that
-none of the above (nor sprintf(), vsprintf(), or *SHUDDER* gets())
-ever creep back to libperl.a.
-
- nm libperl.a | ./miniperl -alne '$o = $F[0] if /:$/; print "$o $F[1]" if $F[0] eq "U" && $F[1] =~ /^(?:strn?c(?:at|py)|v?sprintf|gets)$/'
-
-Note, of course, that this will only tell whether B<your> platform
-is using those naughty interfaces.
-
=head2 Audit the code for destruction ordering assumptions
Change 25773 notes
@@ -608,6 +609,25 @@ from <char *> to <const char *>. It should now be possible to propagate
const-correctness outwards to C<S_parse_body()>, C<Perl_moreswitches()>
and C<Perl_yylex()>.
+=head2 Duplicate logic in S_method_common() and Perl_gv_fetchmethod_autoload()
+
+A comment in C<S_method_common> notes
+
+ /* This code tries to figure out just what went wrong with
+ gv_fetchmethod. It therefore needs to duplicate a lot of
+ the internals of that function. We can't move it inside
+ Perl_gv_fetchmethod_autoload(), however, since that would
+ cause UNIVERSAL->can("NoSuchPackage::foo") to croak, and we
+ don't want that.
+ */
+
+If C<Perl_gv_fetchmethod_autoload> gets rewritten to take (more) flag bits,
+then it ought to be possible to move the logic from C<S_method_common> to
+the "right" place. When making this change it would probably be good to also
+pass in at least the method name length, if not also pre-computed hash values
+when known. (I'm contemplating a plan to pre-compute hash values for common
+fixed strings such as C<ISA> and pass them in to functions.)
+
=head1 Tasks that need a knowledge of the interpreter