This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
RE: [PATCH] Warning on pararameterless 'use IO' and doc update
[perl5.git] / pod / perlbot.pod
index e495266..bc4e4da 100644 (file)
@@ -104,14 +104,14 @@ variables.  Named parameters are also demonstrated.
 
        package main;
 
-       $x = Foo->new( 'High' => 42, 'Low' => 11 );
-       print "High=$x->{'High'}\n";
-       print "Low=$x->{'Low'}\n";
-       $y = Bar->new( 'Left' => 78, 'Right' => 40 );
-       print "Left=$y->[0]\n";
-       print "Right=$y->[1]\n";
-  
+       $a = Foo->new( 'High' => 42, 'Low' => 11 );
+       print "High=$a->{'High'}\n";
+       print "Low=$a->{'Low'}\n";
+
+       $b = Bar->new( 'Left' => 78, 'Right' => 40 );
+       print "Left=$b->[0]\n";
+       print "Right=$b->[1]\n";
+
 =head1 SCALAR INSTANCE VARIABLES
 
 An anonymous scalar can be used when only one instance variable is needed.
@@ -127,8 +127,8 @@ An anonymous scalar can be used when only one instance variable is needed.
 
        package main;
 
-       $x = Foo->new( 42 );
-       print "a=$$x\n";
+       $a = Foo->new( 42 );
+       print "a=$$a\n";
 
 
 =head1 INSTANCE VARIABLE INHERITANCE
@@ -159,9 +159,9 @@ object.
 
        package main;
 
-       $x = Foo->new;
-       print "buz = ", $x->{'buz'}, "\n";
-       print "biz = ", $x->{'biz'}, "\n";
+       $a = Foo->new;
+       print "buz = ", $a->{'buz'}, "\n";
+       print "biz = ", $a->{'biz'}, "\n";
 
 
 
@@ -191,9 +191,9 @@ relationships between objects.
 
        package main;
 
-       $x = Foo->new;
-       print "buz = ", $x->{'Bar'}->{'buz'}, "\n";
-       print "biz = ", $x->{'biz'}, "\n";
+       $a = Foo->new;
+       print "buz = ", $a->{'Bar'}->{'buz'}, "\n";
+       print "biz = ", $a->{'biz'}, "\n";
 
 
 
@@ -314,8 +314,8 @@ that it is impossible to override the BAZ() method.
 
        package main;
 
-       $x = FOO->new;
-       $x->bar;
+       $a = FOO->new;
+       $a->bar;
 
 Now we try to override the BAZ() method.  We would like FOO::bar() to call
 GOOP::BAZ(), but this cannot happen because FOO::bar() explicitly calls
@@ -351,8 +351,8 @@ FOO::private::BAZ().
 
        package main;
 
-       $x = GOOP->new;
-       $x->bar;
+       $a = GOOP->new;
+       $a->bar;
 
 To create reusable code we must modify class FOO, flattening class
 FOO::private.  The next example shows a reusable class FOO which allows the
@@ -386,8 +386,8 @@ method GOOP::BAZ() to be used in place of FOO::BAZ().
 
        package main;
 
-       $x = GOOP->new;
-       $x->bar;
+       $a = GOOP->new;
+       $a->bar;
 
 =head1 CLASS CONTEXT AND THE OBJECT
 
@@ -444,10 +444,10 @@ method where that data is located.
 
        package main;
 
-       $x = Bar->new;
-       $y = Foo->new;
-       $x->enter;
-       $y->enter;
+       $a = Bar->new;
+       $b = Foo->new;
+       $a->enter;
+       $b->enter;
 
 =head1 INHERITING A CONSTRUCTOR
 
@@ -476,8 +476,8 @@ object will be a BAR not a FOO, even though the constructor is in class FOO.
 
        package main;
 
-       $x = BAR->new;
-       $x->baz;
+       $a = BAR->new;
+       $a->baz;
 
 =head1 DELEGATION