Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

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

by brian_d_foy (Abbot)
on Nov 29, 2004 at 06:46 UTC ( [id://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
Domain Nodelet?
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?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (3)
As of 2024-04-19 22:20 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found