From: Perl 5 Porters <perl5-porters@africa.nicoh.com>
Date: Mon, 15 Jul 1996 00:36:25 +0000 (+0000)
Subject: Quote string argument in example -- necessary if using strict subs
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c954a603b8f02c172ffe0fd3503b4d7ca983ad99;p=p5sagit%2Fp5-mst-13.2.git

Quote string argument in example -- necessary if using strict subs
---

diff --git a/ext/GDBM_File/GDBM_File.pm b/ext/GDBM_File/GDBM_File.pm
index 3f1d83e..9c7ae06 100644
--- a/ext/GDBM_File/GDBM_File.pm
+++ b/ext/GDBM_File/GDBM_File.pm
@@ -7,7 +7,7 @@ GDBM_File - Perl5 access to the gdbm library.
 =head1 SYNOPSIS
 
     use GDBM_File ;
-    tie %hash, GDBM_File, $filename, &GDBM_WRCREAT, 0640);
+    tie %hash, 'GDBM_File', $filename, &GDBM_WRCREAT, 0640);
     # Use the %hash array.
     untie %hash ;
 
diff --git a/ext/NDBM_File/NDBM_File.pm b/ext/NDBM_File/NDBM_File.pm
index 6072e65..47b1f5a 100644
--- a/ext/NDBM_File/NDBM_File.pm
+++ b/ext/NDBM_File/NDBM_File.pm
@@ -28,7 +28,7 @@ NDBM_File - Tied access to ndbm files
 
  use NDBM_File;
 
- tie(%h,NDBM_File,'Op.dbmx', O_RDWR|O_CREAT, 0640);
+ tie(%h, 'NDBM_File', 'Op.dbmx', O_RDWR|O_CREAT, 0640);
 
  untie %h;
 
diff --git a/ext/ODBM_File/ODBM_File.pm b/ext/ODBM_File/ODBM_File.pm
index e5386e8..923640f 100644
--- a/ext/ODBM_File/ODBM_File.pm
+++ b/ext/ODBM_File/ODBM_File.pm
@@ -24,7 +24,7 @@ ODBM_File - Tied access to odbm files
 
  use ODBM_File;
 
- tie(%h,ODBM_File,'Op.dbmx', O_RDWR|O_CREAT, 0640);
+ tie(%h, 'ODBM_File', 'Op.dbmx', O_RDWR|O_CREAT, 0640);
 
  untie %h;
 
diff --git a/ext/SDBM_File/SDBM_File.pm b/ext/SDBM_File/SDBM_File.pm
index 9b7acc1..a2d4df8 100644
--- a/ext/SDBM_File/SDBM_File.pm
+++ b/ext/SDBM_File/SDBM_File.pm
@@ -24,7 +24,7 @@ SDBM_File - Tied access to sdbm files
 
  use SDBM_File;
 
- tie(%h,SDBM_File,'Op.dbmx', O_RDWR|O_CREAT, 0640);
+ tie(%h, 'SDBM_File', 'Op.dbmx', O_RDWR|O_CREAT, 0640);
 
  untie %h;
 
diff --git a/lib/AnyDBM_File.pm b/lib/AnyDBM_File.pm
index 50acce4..c985e7e 100644
--- a/lib/AnyDBM_File.pm
+++ b/lib/AnyDBM_File.pm
@@ -39,8 +39,8 @@ will only find GDBM_File.
 Having multiple DBM implementations makes it trivial to copy database formats:
 
     use POSIX; use NDBM_File; use DB_File;
-    tie %newhash,  DB_File, $new_filename, O_CREAT|O_RDWR;
-    tie %oldhash,  NDBM_File, $old_filename, 1, 0;
+    tie %newhash,  'DB_File', $new_filename, O_CREAT|O_RDWR;
+    tie %oldhash,  'NDBM_File', $old_filename, 1, 0;
     %newhash = %oldhash;
 
 =head2 DBM Comparisons
diff --git a/lib/Tie/Hash.pm b/lib/Tie/Hash.pm
index 9a9d059..20b6777 100644
--- a/lib/Tie/Hash.pm
+++ b/lib/Tie/Hash.pm
@@ -26,8 +26,8 @@ Tie::Hash, Tie::StdHash - base class definitions for tied hashes
     
     package main;
     
-    tie %new_hash, NewHash;
-    tie %new_std_hash, NewStdHash;
+    tie %new_hash, 'NewHash';
+    tie %new_std_hash, 'NewStdHash';
 
 =head1 DESCRIPTION
 
diff --git a/lib/Tie/Scalar.pm b/lib/Tie/Scalar.pm
index 2db02ae..ef27dc1 100644
--- a/lib/Tie/Scalar.pm
+++ b/lib/Tie/Scalar.pm
@@ -26,8 +26,8 @@ Tie::Scalar, Tie::StdScalar - base class definitions for tied scalars
     
     package main;
     
-    tie $new_scalar, NewScalar;
-    tie $new_std_scalar, NewStdScalar;
+    tie $new_scalar, 'NewScalar';
+    tie $new_std_scalar, 'NewStdScalar';
 
 =head1 DESCRIPTION
 
diff --git a/lib/Tie/SubstrHash.pm b/lib/Tie/SubstrHash.pm
index a01c66e..825f305 100644
--- a/lib/Tie/SubstrHash.pm
+++ b/lib/Tie/SubstrHash.pm
@@ -8,7 +8,7 @@ Tie::SubstrHash - Fixed-table-size, fixed-key-length hashing
 
     require Tie::SubstrHash;
 
-    tie %myhash, Tie::SubstrHash, $key_len, $value_len, $table_size;
+    tie %myhash, 'Tie::SubstrHash', $key_len, $value_len, $table_size;
 
 =head1 DESCRIPTION
 
diff --git a/pod/perlbot.pod b/pod/perlbot.pod
index 0fd545f..0f7078f 100644
--- a/pod/perlbot.pod
+++ b/pod/perlbot.pod
@@ -277,11 +277,11 @@ This example demonstrates an interface for the SDBM class.  This creates a
 	package main;
 	use Fcntl qw( O_RDWR O_CREAT );
 
-	tie %foo, Mydbm, "Sdbm", O_RDWR|O_CREAT, 0640;
+	tie %foo, "Mydbm", "Sdbm", O_RDWR|O_CREAT, 0640;
 	$foo{'bar'} = 123;
 	print "foo-bar = $foo{'bar'}\n";
 
-	tie %bar, Mydbm, "Sdbm2", O_RDWR|O_CREAT, 0640;
+	tie %bar, "Mydbm", "Sdbm2", O_RDWR|O_CREAT, 0640;
 	$bar{'Cathy'} = 456;
 	print "bar-Cathy = $bar{'Cathy'}\n";
 
@@ -522,6 +522,6 @@ behavior by adding custom FETCH() and STORE() methods, if this is desired.
 	package main;
 	use Fcntl qw( O_RDWR O_CREAT );
 
-	tie %foo, Mydbm, "adbm", O_RDWR|O_CREAT, 0640;
+	tie %foo, "Mydbm", "adbm", O_RDWR|O_CREAT, 0640;
 	$foo{'bar'} = 123;
 	print "foo-bar = $foo{'bar'}\n";