Help for this page

Select Code to Download


  1. or download this
    # lib/Example/Module/Enhanced.pm
    use 5.008009;
    ...
    };
    
    1;
    
  2. or download this
    use Example::Module;
    use Example::Module::Enhanced;
    ...
    Example::Module::Enhanced->patch_object( $obj );
    
    # Now $obj1 has your monkey patch, but $obj2 is still non-patched!!!
    
  3. or download this
    use Example::Module;
    use Example::Module::Enhanced -auto;
    ...
    my $obj2 = Example::Module->new;
    
    # All Example::Module objects are monkey-patched!