Help for this page

Select Code to Download


  1. or download this
    use strict;
    use warnings;
    ...
    Foo->display(a => 400, b=>800);
    Foo::display(a => 400, b=>800); 
    Foo::display(a => 400, b=>800, 900);
    
  2. or download this
    object method called with                                             
    +                
    a = 400
    ...
    b = 800
    
    missing key/value (a 400 b 800 900) at /Users/adrianh/Desktop/foo.pl l
    +ine 35
    
  3. or download this
                ref($_[0])
                   and
    ...
                      ||
                   ( caller(0) )[0] eq __PACKAGE__
                )
    
  4. or download this
    use vars qw( $VERSION   @ISA   @EXPORT_OK   %EXPORT_TAGS );
    use Exporter;
    ...
    @ISA         = qw( Exporter );
    @EXPORT_OK   = qw( shave_opts coerce_array OOorNO myargs myself );
    %EXPORT_TAGS = ( 'all' => [@EXPORT_OK] );
    
  5. or download this
    use base qw(Exporter);
    our $VERSION = 0.01_0;
    our @EXPORT_OK   = qw( shave_opts coerce_array OOorNO myargs myself );
    our %EXPORT_TAGS = ( 'all' => [@EXPORT_OK] );
    
  6. or download this
    # --------------------------------------------------------
    # Constructor
    # --------------------------------------------------------
    sub new { bless( {}, shift (@_) ) }
    
  7. or download this
    # --------------------------------------------------------
    # Class::OOorNO::Class::OOorNO()
    ...
          if defined( $_[0] )
          and UNIVERSAL::can( $_[0], 'can' );
    }
    
  8. or download this
    sub DESTROY  { }
    sub AUTOLOAD { }
    
  9. or download this
    use strict;
    use warnings;
    ...
    isa_ok $o, 'Class::OOorNO';
    
    dies_ok {$o->this_method_does_not_exist} 'unknown method dies';
    
  10. or download this
    ok 1 - use Class::OOorNO;
    ok 2 - The object isa Class::OOorNO                                   
    +                     
    not ok 3 - unknown method dies
    #     Failed test (t/foo.t at line 13)                                
    +                     
    # Looks like you failed 1 tests of 3.
    
  11. or download this
    ok 1 - use Class::OOorNO;
    ok 2 - The object isa Class::OOorNO
    ok 3 - unknown method dies
    ok
    
  12. or download this
    sub OOorNO {
        return ( $_[0] ) 
            if defined( $_[0] )
            and UNIVERSAL::can( $_[0], 'can' );
    }
    
  13. or download this
    sub OOorNO {
        return $_[0] if UNIVERSAL::can( $_[0], 'can' );
    }
    
  14. or download this
    sub OOorNO {
        UNIVERSAL::can( $_[0], 'can' );
    }
    
  15. or download this
    sub new { bless({ }, shift(@_)) }
    
  16. or download this
    sub new { bless {}, shift }