Professional Web Applications Themes

Adding installable script to a perl module distro? - PERL Modules

Ignoramus8644 wrote: > I created a perl module distro Net::eBay, and added to it a small > sample program get-ebay-official-time.pl. How do I make it install > into /usr/bin without being too unix specific. I suppose you're using ExtUtils::MakeMaker for your module. Have a look at the EXE_FILES parameter. Rob...

  1. #1

    Default Re: Adding installable script to a perl module distro?

    Ignoramus8644 wrote:
    > I created a perl module distro Net::eBay, and added to it a small
    > sample program get-ebay-official-time.pl. How do I make it install
    > into /usr/bin without being too unix specific.
    I suppose you're using ExtUtils::MakeMaker for your module.
    Have a look at the EXE_FILES parameter.

    Rob
    Robert Jordan Guest

  2. #2

    Default Re: Adding installable script to a perl module distro?

    Ignoramus8644 <ignoramus8644NOSPAM.8644.invalid> wrote:
    > On Tue, 30 Aug 2005 21:50:04 +0200, Robert Jordan <robertjgmx.net>
    > wrote:
    >> Ignoramus8644 wrote:
    >>> I created a perl module distro Net::eBay, and added to it a small
    >>> sample program get-ebay-official-time.pl. How do I make it install
    >>> into /usr/bin without being too unix specific.
    >>
    >> I suppose you're using ExtUtils::MakeMaker for your module.
    >> Have a look at the EXE_FILES parameter.
    >
    > Thanks. I did it, but it does not install into /usr/bin when I do
    > "make install". It installs into
    >
    > /usr/lib/perl5/site_perl/5.8.6/Net/ebay-official-time.pl
    >
    > It's not where I want it to be. Any ideas?
    I wouldn't want a script to install *anything* in my /usr/bin.

    If it's a short example I would put it in the pod doentation.

    If you want to have it installed,

    /usr/lib/perl5/site_perl/5.8.6/Net/eBay/examples might be a good place

    or

    /usr/lib/perl5/site_perl/5.8.6/Net/eBay/eg

    or

    /usr/lib/perl5/site_perl/5.8.6/Net/eBay/demo

    (after a look at my C:\Perl)


    --
    John Small Perl scripts: [url]http://johnbokma.com/perl/[/url]
    Perl programmer available: [url]http://castleamber.com/[/url]
    Happy Customers: [url]http://castleamber.com/testimonials.html[/url]

    John Bokma Guest

  3. #3

    Default Re: Adding installable script to a perl module distro?

    Ignoramus8644 <ignoramus8644NOSPAM.8644.invalid> wrote:
    > Well, it is a useful script. People could use it.
    Like I said, put it in the pod doc. I can't imagine it's more then 10
    lines.

    Just a q wrt doentation:

    DetailLevel => "0",

    I doubt "" are needed here


    * function1
    * function2
    * officialTime

    ?

    I have no idea how the api works, but

    $ebay->submitRequest( "AddItem",

    maybe $ebay->AddItem would be easier? (or $ebay->add_item, see below)

    And things like DetailLevel, ErrorLevel, etc. shouldn't they be set
    globally?

    (and finally, either use CamelCase (e.g. DeveloperKey) or under_scores
    (e.g. site_level). I prefer the latter, more Perlish.

    --
    John Small Perl scripts: [url]http://johnbokma.com/perl/[/url]
    Perl programmer available: [url]http://castleamber.com/[/url]
    Happy Customers: [url]http://castleamber.com/testimonials.html[/url]

    John Bokma Guest

  4. #4

    Default Re: Adding installable script to a perl module distro?

    Ignoramus8644 wrote:
    >>
    >>I wouldn't want a script to install *anything* in my /usr/bin.
    >
    >
    > Well, it is a useful script. People could use it.
    But it shoudl be installed into $Config{'installsitescripts'} (IIRC),
    if anywhere.

    This may well be somewhere other than /usr/bin, but should be
    appropriate for any particular Perl instalaltion.



    --
    Just because I've written it doesn't mean that
    either you or I have to believe it.
    Big and Blue Guest

  5. #5

    Default Re: Adding installable script to a perl module distro?


    "Ignoramus8644" <ignoramus8644NOSPAM.8644.invalid> wrote in message
    > >
    > > But it shoudl be installed into $Config{'installsitescripts'}
    (IIRC),
    > > if anywhere.
    I think that should be $Config{installscript}, which is where EXE_FILES go.
    > >
    > > This may well be somewhere other than /usr/bin, but should be
    > > appropriate for any particular Perl instalaltion.
    >
    > Hm, how do I accomplish that? I do not think that the script was
    > installed into any other place than the one I mentioned.
    >
    The place you mentioned and $Config{installscript} should be one and the
    same place. To check, run:

    perl -V:installscript

    Cheers,
    Rob


    Sisyphus Guest

  6. #6

    Default Re: Adding installable script to a perl module distro?

    Ignoramus8644 <ignoramus8644NOSPAM.8644.invalid> wrote:
    > On 30 Aug 2005 20:41:56 GMT, John Bokma <johncastleamber.com> wrote:
    >> DetailLevel => "0",
    >>
    >> I doubt "" are needed here
    >
    > Whatever, that 0 is not going to be used numerically, it is a string.
    Which Perl probably handles for you ;-)
    >> * function1
    >> * function2
    >> * officialTime
    >>
    >> ?
    saw the above in the doentation, but no idea what it means
    >> I have no idea how the api works, but
    >>
    >> $ebay->submitRequest( "AddItem",
    >>
    >> maybe $ebay->AddItem would be easier? (or $ebay->add_item, see below)
    >
    > Not really, my Net::eBay does not know any application details.
    Which might be a pitty, see below.
    > It
    > simply wraps requests into proper XML, supplies eBay credentials and
    > sends the request to ebay. Every request has a name, and a hash of
    > parameters. (hashes of hashes are allowed and are translated into
    > proper XML structures).
    Yes, but a module is a nice place to make things abstract, and easier to
    use.
    >> (and finally, either use CamelCase (e.g. DeveloperKey) or
    >> under_scores (e.g. site_level). I prefer the latter, more Perlish.
    >
    > I'll think about it. My reasoning when I did the original module was
    > that the keys and token are ebay values, and site_evel is purely a
    > perl value that ebay knows nothing about.
    Ok, clear. But you are already "translating" XML to Perl, so why not go
    all the way, e.g. hide the whole fact that it's just hashes translated
    to XML, and CamelCase. Just provide a module that has a very easy
    interface to use, but internally does all the work.

    You might for example both support "raw" methods, and nice wrappers
    (e.g. $ebay->add_item, or even add a Net::eBay::Item class instead of
    passing a hash).

    --
    John Small Perl scripts: [url]http://johnbokma.com/perl/[/url]
    Perl programmer available: [url]http://castleamber.com/[/url]
    Happy Customers: [url]http://castleamber.com/testimonials.html[/url]

    John Bokma Guest

  7. #7

    Default Re: Adding installable script to a perl module distro?

    Ignoramus8644 <ignoramus8644NOSPAM.8644.invalid> wrote:
    > I changed site_level to SiteLevel and cleaned up the pod
    > doentation. Just uploaded Net-eBay-0.06. Thanks John.
    You're welcome. :-)

    --
    John Small Perl scripts: [url]http://johnbokma.com/perl/[/url]
    Perl programmer available: [url]http://castleamber.com/[/url]
    Happy Customers: [url]http://castleamber.com/testimonials.html[/url]

    John Bokma Guest

Similar Threads

  1. Replies: 8
    Last Post: June 23rd, 08:38 AM
  2. adding a new module to CPAN
    By matthias.eckardt@link-up.de in forum PERL Modules
    Replies: 5
    Last Post: October 4th, 07:50 PM
  3. Control a non-perl image viewer from perl script
    By Harry Putnam in forum PERL Beginners
    Replies: 1
    Last Post: October 31st, 10:28 PM
  4. How to create a Perl module to be used in a CGI script
    By James in forum PERL Miscellaneous
    Replies: 1
    Last Post: August 16th, 03:05 AM
  5. Execute shell script from a perl script
    By kderaedt in forum Perl / CGI
    Replies: 3
    Last Post: June 26th, 08:26 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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