From: Rafael Garcia-Suarez Date: Sun, 22 Oct 2006 13:15:39 +0000 (+0000) Subject: Make the overrides of built-ins in the bytes pragma use the new prototype _. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=79077e6c14f0cd677dcb64896680dbda123b70a3;p=p5sagit%2Fp5-mst-13.2.git Make the overrides of built-ins in the bytes pragma use the new prototype _. p4raw-id: //depot/perl@29078 --- 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]); }