adding in the metaclass pragma
[gitmo/Class-MOP.git] / examples / LazyClass.pod
index 1f504af..8aaa30c 100644 (file)
@@ -77,11 +77,9 @@ LazyClass - An example metaclass with lazy initialization
 
   package BinaryTree;
   
-  sub meta {
-      LazyClass->initialize($_[0] => (
-          ':attribute_metaclass' => 'LazyClass::Attribute'
-      ));
-  }
+  use metaclass 'LazyClass' => (
+      ':attribute_metaclass' => 'LazyClass::Attribute'
+  );
   
   BinaryTree->meta->add_attribute('$:node' => (
       accessor => 'node',