Some of the test code was formatted very weirdly (tabs, wrong spacing,
[gitmo/Moose.git] / t / 000_recipes / basics / 003_binary_tree.t
index 0f85f95..ac03763 100644 (file)
@@ -12,37 +12,37 @@ use Scalar::Util 'isweak';
     package BinaryTree;
     use Moose;
 
-    has 'node' => (is => 'rw', isa => 'Any');
+    has 'node' => ( is => 'rw', isa => 'Any' );
 
     has 'parent' => (
-               is        => 'rw',
-               isa       => 'BinaryTree',      
+        is        => 'rw',
+        isa       => 'BinaryTree',
         predicate => 'has_parent',
-               weak_ref  => 1,
+        weak_ref  => 1,
     );
 
     has 'left' => (
-               is        => 'rw',      
-               isa       => 'BinaryTree',              
-        predicate => 'has_left',  
+        is        => 'rw',
+        isa       => 'BinaryTree',
+        predicate => 'has_left',
         lazy      => 1,
-        default   => sub { BinaryTree->new(parent => $_[0]) },       
+        default   => sub { BinaryTree->new( parent => $_[0] ) },
     );
 
     has 'right' => (
-               is        => 'rw',      
-               isa       => 'BinaryTree',              
-        predicate => 'has_right',   
-        lazy      => 1,       
-        default   => sub { BinaryTree->new(parent => $_[0]) },       
+        is        => 'rw',
+        isa       => 'BinaryTree',
+        predicate => 'has_right',
+        lazy      => 1,
+        default   => sub { BinaryTree->new( parent => $_[0] ) },
     );
 
     before 'right', 'left' => sub {
-        my ($self, $tree) = @_;
-           $tree->parent($self) if defined $tree;   
-       };
-       
-    __PACKAGE__->meta->make_immutable(debug => 0);     
+        my ( $self, $tree ) = @_;
+        $tree->parent($self) if defined $tree;
+    };
+
+    __PACKAGE__->meta->make_immutable( debug => 0 );
 }
 
 my $root = BinaryTree->new(node => 'root');