January 2002 ModuleMaker Slide 4

The Barest of Modules


package Sample::Module;

use strict;



BEGIN{

  use Exporter ();

  use vars qw ($VERSION @ISA @EXPORT @EXPORT_OK %EXPORT_TAGS);

  $VERSION     = 0.01;

  @ISA         = qw (Exporter);

  @EXPORT      = qw ();

  @EXPORT_OK   = qw ();

  %EXPORT_TAGS = ();

}



#Everything else goes here



1;

__END__

  • package gives the name of the module
  • The filename would be Sample/Module.pm and the Sample directory will live in one of the directories listed in @INC