Shell script build Config.pm file

Ask a Question related to PERL Beginners, Design and Development.

  1. #1

    Default Shell script build Config.pm file

    From a bash shell on Red Hat AS 3, can I automatically create the
    /usr/lib/perl5/5.8.0/CPAN/Config.pm file?

    I am trying to automate the installation of some PERL modules but I
    would like to automate the initial configuration step as well.

    Michael E. Griffin
    Red Hat Linux Systems Administrator
    PEC Solutions
    12750 Fair Lakes Circle
    Fairfax, VA 22033
    703.306.3094
    [email]Michael.Griffin@pec.com[/email]
    Michael Griffin Guest

  2. Similar Questions and Discussions

    1. shell script help!!
      hi all, i have some commands on hand, but i don't know how i can stick it up with (ksh) shell script... can anyone help? 1) use find to list...
    2. Error loading XML file c:\windows\microsoft.net\framework\v1.0.3705\Config\machine.config
      I had many ASP.NET web applications that I created before I had to rebuild my machine. After a fresh install of XP Pro, VS.NET 2003, etc, I now...
    3. config file: a) what Module ? b) conditionals in config (for multiple hosts)
      Hi, a) I am looking for a module to handle config files. There are a number of these modules, like AppCconig. Any consensus about The Right...
    4. shell script to transfer flat file generated from isql query to microsoft access database
      Can someone help me with a way in shell script to transfer flat file generated from isql query to microsoft access database. Thanks
    5. Execute shell script from a perl script
      Hi, How can I executed a Unix shell script from a Perl script. The shell script is a dump of a oracle table to a file. The perl script is for...
  3. #2

    Default Re: Shell script build Config.pm file

    > >From a bash shell on Red Hat AS 3, can I automatically create the
    > /usr/lib/perl5/5.8.0/CPAN/Config.pm file?
    >
    > I am trying to automate the installation of some PERL modules but I
    > would like to automate the initial configuration step as well.
    >
    Does it work? Have you tried? What was the result?

    Depending on the user running the automation non root that is, you may
    need a ~/.cpan/CPAN/MyConfig.pm.

    perldoc CPAN for more on automation of install of modules.

    [url]http://danconia.org[/url]

    p.s. Perl or perl, never PERL
    Wiggins D Anconia Guest

  4. #3

    Default RE: Shell script build Config.pm file

    I have found that there is documentation indicating the automation of
    modules:
    perl -MCPAN -e 'install Bundle::myBundle'
    where myBundle is basically a pod file with =head1 CONTENTS and then a
    list of the modules to install.

    I have seen some documentation using the interactive CPAN shell that
    indicates that using o conf <scalar option> <value> allows the setting
    of these particular values. I have not found documentation on scripting
    out the parameters to the Config.pm file. I was considering echoing the
    values out to the file, but I would prefer to send perl commands so as
    not to mess up the format or syntax, i.e. perl [some switch(s)] [some
    arguments].

    thanks,

    Michael

    p.s. Sorry about the perl


    > >From a bash shell on Red Hat AS 3, can I automatically create the
    > /usr/lib/perl5/5.8.0/CPAN/Config.pm file?
    >
    > I am trying to automate the installation of some PERL modules but I
    > would like to automate the initial configuration step as well.
    >
    Does it work? Have you tried? What was the result?

    Depending on the user running the automation non root that is, you may
    need a ~/.cpan/CPAN/MyConfig.pm.

    perldoc CPAN for more on automation of install of modules.

    [url]http://danconia.org[/url]

    p.s. Perl or perl, never PERL
    Michael Griffin Guest

  5. #4

    Default RE: Shell script build Config.pm file

    Please bottom post...
    > I have found that there is documentation indicating the automation of
    > modules:
    > perl -MCPAN -e 'install Bundle::myBundle'
    > where myBundle is basically a pod file with =head1 CONTENTS and then a
    > list of the modules to install.
    >
    > I have seen some documentation using the interactive CPAN shell that
    > indicates that using o conf <scalar option> <value> allows the setting
    > of these particular values. I have not found documentation on scripting
    > out the parameters to the Config.pm file. I was considering echoing the
    > values out to the file, but I would prefer to send perl commands so as
    > not to mess up the format or syntax, i.e. perl [some switch(s)] [some
    > arguments].
    >
    > thanks,
    >
    > Michael
    >
    > p.s. Sorry about the perl
    Ok, let's back up a bit. I am assuming that Perl is installed, CPAN is
    installed in at least its stock form. So my first question, why use a
    shell script instead of a Perl script? Second question would be how
    many of the values are changing based on the actual location of install?
    In other words, can it be enough to just install the same base config file?

    Ah, now to the beauty of open source, it appears after a cursory
    cracking open of CPAN.pm (we can, you know, isn't it grand!) when
    storing a configuration using 'o conf commit' CPAN simply calls the
    'CPAN::Config->commit' method. CPAN::Config is just a hash of
    configuration options (well actually an object), and 'commit' uses
    ExtUtils::MakeMaker::neatvalue to actually store the values. There are
    also a number of other neat methods for manipulating CPAN configs in
    CPAN::Config, such as 'edit' and 'load', presumably everything one needs
    to automate the process. Under 'CONFIGURATION' in perldoc CPAN is a
    list of the properties that you may configure (or just crack open a
    Config.pm that was previously made).

    Thoughts?

    [url]http://danconia.org[/url]
    Wiggins D Anconia Guest

  6. #5

    Default RE: Shell script build Config.pm file

    > I have found that there is documentation indicating the automation of
    > modules:
    > perl -MCPAN -e 'install Bundle::myBundle'
    > where myBundle is basically a pod file with =head1 CONTENTS and then a
    > list of the modules to install.
    >
    > I have seen some documentation using the interactive CPAN shell that
    > indicates that using o conf <scalar option> <value> allows the setting
    > of these particular values. I have not found documentation on
    > scripting out the parameters to the Config.pm file. I was considering
    > echoing the values out to the file, but I would prefer to send perl
    > commands so as not to mess up the format or syntax, i.e. perl [some
    > switch(s)] [some arguments].
    >
    > thanks,
    >
    > Michael
    >
    > p.s. Sorry about the perl
    Ok, let's back up a bit. I am assuming that Perl is installed, CPAN is
    installed in at least its stock form. So my first question, why use a
    shell script instead of a Perl script? Second question would be how
    many of the values are changing based on the actual location of install?
    In other words, can it be enough to just install the same base config
    file?

    Ah, now to the beauty of open source, it appears after a cursory
    cracking open of CPAN.pm (we can, you know, isn't it grand!) when
    storing a configuration using 'o conf commit' CPAN simply calls the
    'CPAN::Config->commit' method. CPAN::Config is just a hash of
    configuration options (well actually an object), and 'commit' uses
    ExtUtils::MakeMaker::neatvalue to actually store the values. There are
    also a number of other neat methods for manipulating CPAN configs in
    CPAN::Config, such as 'edit' and 'load', presumably everything one needs
    to automate the process. Under 'CONFIGURATION' in perldoc CPAN is a
    list of the properties that you may configure (or just crack open a
    Config.pm that was previously made).

    Thoughts?

    [url]http://danconia.org[/url]


    Okay.
    - Perl is installed.
    - Nothing has been done to the default install (I have not installed
    anything nor even gone into the shell). I am assuming that this means
    that CPAN is in a default state as I have that directory in the
    installation directory.
    - I am not opposed to using a perl script as long as I can use it in
    it's default installed state.
    - Not being familiar with perl, I did look at the FirstTime script and
    became slightly overwhelmed and therefore joined the list.
    - Is it possible to drop a previously created Config.pm file into place
    without error or repercussion?
    - Are you suggesting running or revamping the Config script to suit my
    needs?

    Thank you for your patience and instruction. I am learning a lot.

    Michael



    Michael Griffin Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139