From 79077e6c14f0cd677dcb64896680dbda123b70a3 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Sun, 22 Oct 2006 13:15:39 +0000 Subject: [PATCH] Make the overrides of built-ins in the bytes pragma use the new prototype _. p4raw-id: //depot/perl@29078 --- lib/bytes.pm | 8 ++++---- lib/bytes_heavy.pl | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/bytes.pm b/lib/bytes.pm index a822279..b7fabbf 100644 --- a/lib/bytes.pm +++ b/lib/bytes.pm @@ -1,6 +1,6 @@ package bytes; -our $VERSION = '1.02'; +our $VERSION = '1.03'; $bytes::hint_bits = 0x00000008; @@ -19,9 +19,9 @@ sub AUTOLOAD { Carp::croak("Undefined subroutine $AUTOLOAD called"); } -sub length ($); -sub chr ($); -sub ord ($); +sub length (_); +sub chr (_); +sub ord (_); sub substr ($$;$$); sub index ($$;$); sub rindex ($$;$); diff --git a/lib/bytes_heavy.pl b/lib/bytes_heavy.pl index 923381d..680c66c 100644 --- a/lib/bytes_heavy.pl +++ b/lib/bytes_heavy.pl @@ -1,6 +1,6 @@ package bytes; -sub length ($) { +sub length (_) { BEGIN { bytes::import() } return CORE::length($_[0]); } @@ -13,12 +13,12 @@ sub substr ($$;$$) { CORE::substr($_[0], $_[1], $_[2], $_[3]) ; } -sub ord ($) { +sub ord (_) { BEGIN { bytes::import() } return CORE::ord($_[0]); } -sub chr ($) { +sub chr (_) { BEGIN { bytes::import() } return CORE::chr($_[0]); } -- 1.8.3.1