Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: Building an anonymous subroutine

by stephen (Priest)
on Aug 13, 2002 at 03:22 UTC ( [id://189698]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package Encoder;
    
    ...
       $self->common_stuff($text);
       $self->other_stuff($text);
    }
    
  2. or download this
    # In Encoder/B.pm
    package Encoder::B;
    ...
       my $new_text = $text;
       $new_text =~ s/a/c/g;
    }
    
  3. or download this
    use Encoder::B;
    use Encoder::Whatever;
    ...
      return $Encoder_Table{$e}->new();
    }
    
  4. or download this
    my $encoder = encoder_factory($whatever_e_is);
    print $encoder->encode("Hahahaha!");
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://189698]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (3)
As of 2024-04-24 21:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found