summaryrefslogtreecommitdiff
path: root/lib/bytes.t
diff options
context:
space:
mode:
authorTodd Rinaldo <toddr@cpan.org>2020-09-11 17:19:17 -0500
committerTodd Rinaldo <toddr@cpan.org>2020-10-13 12:46:40 -0500
commitba6f05dbf3328e0cf055fb6ae3d48e11f7b7c6c1 (patch)
treeb0eac5bf143f645eda0c614d64f7d7af54844548 /lib/bytes.t
parent6c5cb1edade78fb5e14f9948a720cb5fe3c7b6c5 (diff)
downloadperl-ba6f05dbf3328e0cf055fb6ae3d48e11f7b7c6c1.tar.gz
Fix enough code to get make test_prep working with -dDusedefaultstrict
This change fixes enough code that it's possible to run make test_prep when perl is compiled with -Dusedefaultstrict. There are 2 caveats to this: - Does not address XSLoader/DynaLoader already submitted in another PR. - Does not address cpan/Pod-Usage or cpan/Text-Tabs which continue to be outstanding upstream.
Diffstat (limited to 'lib/bytes.t')
-rw-r--r--lib/bytes.t11
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/bytes.t b/lib/bytes.t
index 4e50ff3361..4025d9db94 100644
--- a/lib/bytes.t
+++ b/lib/bytes.t
@@ -1,3 +1,7 @@
+#!perl
+
+use strict;
+use warnings;
BEGIN {
chdir 't' if -d 't';
@@ -14,8 +18,11 @@ is(length($a), 1, "length sanity check");
is(substr($a, 0, 1), "\x{100}", "substr sanity check");
is(index($a, "\x{100}"), 0, "index sanity check");
is(rindex($a, "\x{100}"), 0, "rindex sanity check");
-is(bytes::length($a), 2, "bytes::length sanity check");
-is(bytes::chr(0x100), chr(0), "bytes::chr sanity check");
+{
+ no warnings 'prototype'; # bytes::length() called too early to check prototype at...
+ is(bytes::length($a), 2, "bytes::length sanity check");
+ is(bytes::chr(0x100), chr(0), "bytes::chr sanity check");
+}
{
use bytes;