How to install the package you have constructed ?
The better way when constructing a new package is to use h2xs tool, because it creates the schelet for you. It also create a Makefile.PL template script, which you can use to install the package.
Let say you want to construct a package called my_package.
From the shell (or command promp) issue the following:
%>h2xs -AXn my_package
This will create a directory called my_package. Inside it will create the following files:
Changes MANIFEST Makefile.PL README my_package.pm test.pl
Edit the my_package.pm file, to your package. Follow comments inside the package. Edit the Makefile.PL file as you need.
From the command prompt issue:
%> perl Makefile.PL
A makefile will be generated for your platform.
NOW HOW TO INSTALL THE PACKAGE?
Like any package from CPAN
make
make test
make install
Now you really have installed the package. From now, you do not have to worry about the path to the package file, when using the package from your scripts.
Adrian