On Monday, July 8, 2002, at 09:58 , Connie Chan wrote:

> But do you have any much simplier idea so I can just
> use myLib;  # would be all done ?

yes, make a module then 'hard wire' your applications with the

        use DTK::Net::DI704;

if that is where you have stuffed all the things it will ever
need to know about getting the job done.

cf:
http://www.wetware.com/drieux/CS/Proj/DI704/

where I am still trying to finish the write up of what all and
why all we went the way that we did....

> but without using other specified syntax... or declarations.
> This would me more convinence for portable reasons while
> easier for me for coding it....

The simplest in the lot, actually, remains the idea of
starting with h2xs to build out any modules that you
will need as 'support' for the set of applications.

First off it provides the 'standard' frame work for
the module itself:

cf:
http://www.wetware.com/drieux/CS/lang/Perl/PM/PMbasics.html

and the default value for 'make install' will be the standard
places that CPAN modules will be installed. Hence all of your
scripts will be able to 'reference' your new 'module' as IF
it were just another one of the standard *.PM's that come
either with the current release of perl - or with any
extensions that you download from the CPAN.

As you will note from several of my basic projects, I
have to write for 'portability' since darwin has some
tricks, solaris other, linux it's own sillies....

> What I am looking for is to set something into a hard
> code parameter(eg. config file) then nothing will need
> to declare again... Is that possible ? or I must INClude
> them inline ?

Again - I would be thinking about solving the 'install side'
in the same way - and if one wishes to deliver a specific
"config file" - one can do that as a perl module - with
just a bit of trickery as to how you go about getting
the 'end user' preferred set of "config values"....

This way, again, your application layer code, expects that
all of this has been done apriori.

> You mensioned about PERL5LIB, is that a command ?
> or a perl progarm ? or a document ? I just can't find this
> file anywhere.

that is an environmental variable - cf perldoc perlvar
as well as your 'man sh' or which ever shell you are using.

hence it is set like any other environmental variable.

the way that I have done it in ksh is:

        PERL5LIB="${HOME}/lib/perl"
        export PERL5LIB

I do it that way so that my ".profile" will also work
if invoked by /bin/sh....

One can likewise do that for csh in say the .login file
as

        setenv PERL5LIB "$HOME/lib/perl"

and in ......


Notice that if you start with the h2xs tool, you begin
with the premise that IT will be installed in the 'stock'
places that perl puts things - and all you ever need to
do is write code as IF your module, while being found
in the "site_local" section of the canonical @INC will
be on par with all the rest of the 'real modules'....

that does save on all the hard work.

The other side is to get 'strange' and have to deal with
the

        PERL5LIB environmental variable
        use lib <token>

as well as hand roll your own installers....

way too much work.... if you ask me,
since I have taken that route before 'i got it'
about what was being said with

        perldoc h2xs


ciao
drieux


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to