Help for this page

Select Code to Download


  1. or download this
    sub conf {
      shift; # throw away unused class.
      # .. do real work here
    }
    
  2. or download this
    my %re_use = (name => 'Alice');
    Ex::Mod->new( override=>'whatever', %re_use );
    
  3. or download this
    use strict;
    use warnings;
    ...
    my $b = Ex::mod->new( user=>'Bob');
    printf "User a is: %s\n", $a->whoami();
    printf "User b is: %s\n", $b->whoami();
    
  4. or download this
    package Ex::mod;
    use strict;
    ...
        my $self = shift;
        return $self->{user} // undef;
    }