Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

The Null Mull (or, when OO needs more O)

by brian_d_foy (Abbot)
on Nov 29, 2004 at 06:46 UTC ( #410871=perlmeditation: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    $ perl -e '1->method'
    Can't call method "method" without a package or object reference at -e
    + line 1.
    
  2. or download this
    my $result = $obj->methoda->methodb->methodc;
    
  3. or download this
    package Object::EveryMethod;
    
    ...
    sub new { $all }
    
    sub AUTOLOAD { $_[0] }
    
  4. or download this
    # my $False = 0;  # old way
    my $False = Object::EveryMethod->new();
    ...
        else                        { $False }
        
        }
    
  5. or download this
    sub hey_that_worked
        {
        not UNIVERSAL::isa( $_[0], 'Object::EveryMethod' )
        }
    
  6. or download this
    package Object::EveryMethod;
    
    ...
    sub AUTOLOAD { $_[0] }
    
    sub what_happened { @{ $self }{ qw( message setter ) } }
    
  7. or download this
    sub methoda
        {
    ...
            }
        
        }
    
  8. or download this
    package Object::EveryMethod;
    
    ...
    sub can      { 1 }
    
    sub what_happened { @{ $self }{ qw( message setter ) } }
    
  9. or download this
    package Object::EveryMethod;
    
    ...
    sub can      { 0 unless defined &{$_[1]} }
    
    sub what_happened { @{ $self }{ qw( message setter ) } }
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://410871]
Approved by thor
Front-paged by htoug
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2014-07-13 09:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (248 votes), past polls