This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Re: stringification of v-string references
authorJohn Peacock <jpeacock@rowman.com>
Tue, 6 Dec 2005 08:31:32 +0000 (03:31 -0500)
committerNicholas Clark <nick@ccl4.org>
Tue, 6 Dec 2005 16:53:46 +0000 (16:53 +0000)
Message-ID: <439592B4.2050101@rowman.com>
Date: Tue, 06 Dec 2005 08:31:32 -0500

p4raw-id: //depot/perl@26280

t/op/ref.t

index 81a6543..d4fb4fd 100755 (executable)
@@ -8,7 +8,7 @@ BEGIN {
 require 'test.pl';
 use strict qw(refs subs);
 
-plan (96);
+plan (98);
 
 # Test glob operations.
 
@@ -54,6 +54,11 @@ $BAR = \$BAZ;
 $BAZ = "hit";
 is ($$$FOO, 'hit');
 
+# test that ref(vstring) makes sense
+my $vstref = \v1;
+is (ref($vstref), "VSTRING", "ref(vstr) eq VSTRING");
+like ( $vstref, qr/VSTRING\(0x[0-9a-f]+\)/, '\vstr is also VSTRING');
+
 # Test references to real arrays.
 
 my $test = curr_test();