home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / tsw / TSW_3.4.0.exe / Apache2 / perl / LoaderTest.pm < prev    next >
Encoding:
Perl POD Document  |  2001-05-01  |  648 b   |  42 lines

  1. #!/usr/bin/perl -sw
  2. ##
  3. ##
  4. ##
  5. ## Copyright (c) 2001, Vipul Ved Prakash.  All rights reserved.
  6. ## This code is free software; you can redistribute it and/or modify
  7. ## it under the same terms as Perl itself.
  8. ##
  9. ## $Id: LoaderTest.pm,v 1.2 2001/05/01 00:09:12 vipul Exp $
  10.  
  11. package Class::LoaderTest;
  12. use Data::Dumper;
  13.  
  14. sub new { 
  15.  
  16.     my $self = { Method => 'new' };
  17.     return bless $self, shift;
  18.  
  19. }
  20.  
  21.  
  22. sub foo { 
  23.  
  24.     my ($class, $embed) = @_;
  25.     $embed ||= 'foo';
  26.     my $self = { Method => $embed };
  27.     return bless $self, shift;
  28.  
  29. }
  30.  
  31. sub blah { 
  32.  
  33.     my ($class, %params) = @_;
  34.     my $self = { %params };
  35.     return bless $self, $class;
  36.  
  37. }
  38.  
  39. 1;
  40.  
  41.  
  42.