Re: Are there any ALSA Perl Modules?
On Mon, Jan 29, 2024 at 6:28 AM Martin McCormick wrote: [snip] > I may be looking in the wrong places but, so far, I seem > to be batting zeros when looking for perl and alsa together. > I take it that MIDI::ALSA (https://metacpan.org/pod/MIDI::ALSA) has little or nothing to offer ? Cheers, Rob
Re: Are there any ALSA Perl Modules?
Shlomi Fish writes: >> Anyway, the FFI concept will probably someday come in >> handy for a different project so I will continue with the C I was >> working on. What I did in a project is having the main functionality written in C, but using Perl for things that could be handy like parsing a config file (lot of text, regex, etc.) or calling outside script that could be written independently from the main code. Best luck, Olivier -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Are there any ALSA Perl Modules?
hi Martin, On Mon, 29 Jan 2024 22:38:27 -0600 "Martin McCormick" wrote: > Shlomi Fish writes: > > hi Martin, > > you can try using an FFI, eg: > > > > https://metacpan.org/dist/Inline-C/view/lib/Inline/C.pod > > > > https://metacpan.org/dist/Inline-Python/view/Python.pod > > > > https://metacpan.org/pod/FFI::Platypus > > Many thanks. I am glad I asked the question but it has taken me > some time to digest your answer as I wasn't familiar with the > term FFI so, after exercising duckduckgo, I now know those > letters stand for Foreign Function Interface which makes perfect > sense based on what needs to be done. Unfortunately, FFI's are > usually used by higher-level languages to take advantage of the > capabilities found in lower-level languages such as C which is > closer to assembler and can efficiently access the hardware such > as an audio or video device. > I meant that you can use Inline::C or perlxs or similar to write wrappers/bindings for libalsa/etc. > I was hoping there might be a perl module like a > fictional one I will call Device::ALSA which would understand the > syntax used in capturing audio from a microphone or line input, > like a microphone input, only not as sensitive, where one > customarily feeds sound from the output of whatever one is > recording from. > > There are standard alsa conventions for setting sample > rate and other parameters which I mentioned in the earlier > posting so if one knows what sort of digital stream they nead, > they just stuff those values in to the function whose output is > that stream of digital data. What you do with those data is up > to you but the module takes care of getting the bits from the > hardware or sending the bits to your speakers or headphones and > would also support the alsa plugins which are used by the arecord > and aplay utilities for added capabilities. > > I can understand why there is no perl module like > Device::alsa because it would not be portable between Windows and > Linus. The l in alsa is for Linux so basically, I was just > curious to see if anything like Device::ALSA existed and it > apparently does not exist. > Devs *have* written linux-only or mswindows-only perl5/CPAN modules. > Anyway, the FFI concept will probably someday come in > handy for a different project so I will continue with the C I was > working on. > > Thanks again. > > Martin > -- Shlomi Fish https://www.shlomifish.org/ https://www.shlomifish.org/open-source/resources/tech-tips/ XSLT isn't like violence. XSLT is violence - there is no such thing as using it too little. — https://www.shlomifish.org/humour/bits/facts/XSLT/ Please reply to list if it's a mailing list post - https://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Are there any ALSA Perl Modules?
Shlomi Fish writes: > hi Martin, > you can try using an FFI, eg: > > https://metacpan.org/dist/Inline-C/view/lib/Inline/C.pod > > https://metacpan.org/dist/Inline-Python/view/Python.pod > > https://metacpan.org/pod/FFI::Platypus Many thanks. I am glad I asked the question but it has taken me some time to digest your answer as I wasn't familiar with the term FFI so, after exercising duckduckgo, I now know those letters stand for Foreign Function Interface which makes perfect sense based on what needs to be done. Unfortunately, FFI's are usually used by higher-level languages to take advantage of the capabilities found in lower-level languages such as C which is closer to assembler and can efficiently access the hardware such as an audio or video device. I was hoping there might be a perl module like a fictional one I will call Device::ALSA which would understand the syntax used in capturing audio from a microphone or line input, like a microphone input, only not as sensitive, where one customarily feeds sound from the output of whatever one is recording from. There are standard alsa conventions for setting sample rate and other parameters which I mentioned in the earlier posting so if one knows what sort of digital stream they nead, they just stuff those values in to the function whose output is that stream of digital data. What you do with those data is up to you but the module takes care of getting the bits from the hardware or sending the bits to your speakers or headphones and would also support the alsa plugins which are used by the arecord and aplay utilities for added capabilities. I can understand why there is no perl module like Device::alsa because it would not be portable between Windows and Linus. The l in alsa is for Linux so basically, I was just curious to see if anything like Device::ALSA existed and it apparently does not exist. Anyway, the FFI concept will probably someday come in handy for a different project so I will continue with the C I was working on. Thanks again. Martin -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Are there any ALSA Perl Modules?
hi Martin, On Sun, 28 Jan 2024 13:27:45 -0600 "Martin McCormick" wrote: > Several years ago, I wrote some C code which turns one's > computer's sound interface in to a sound-activated recorder that > I could then connect to radio receivers or microphones and record > when audio started and stop recording when there is nothing but > silence. One essentially sets a sound card to record > continuously but the sound samples go through code that knows > what silence looks like. In short, silence looks like samples > whose numeric value is exactly half-way between the lowest and > highest voltage that the analog-to-digital converter reads, > commonly either 32,767 representing silence, give or take a count > or two due to digital sampling errors or decimal 128, hex 80 for > 8-bit mono audio. > > The Advanced Linux Sound Architecture Project has C library > functions for setting sample rates, mono, stereo, big or little > endianness and 8 or 16-bit audio, whatever one needs for their > application. One can even define samples as signed or unsigned > integers. > > Once one gets a stream of ints which are usually 32-bits > wide for stereo or 16-bit shorts for mono, the sound processing > can begin which C is really good at but perl is just as good at > so if one could get the same alsa modules which are used by aplay > and arecord for setting up one's audio interfaces or sound cards, > the manipulation of those data that was done in C could also be > done in perl without hardly any modification to it at all. > > Perl has just the right mix of low-level logic and > bitwise operators plus a much more easy-to-use string handling > capability which is why I am asking this question. > > I may be looking in the wrong places but, so far, I seem > to be batting zeros when looking for perl and alsa together. > you can try using an FFI, eg: https://metacpan.org/dist/Inline-C/view/lib/Inline/C.pod https://metacpan.org/dist/Inline-Python/view/Python.pod https://metacpan.org/pod/FFI::Platypus > Any good ideas are greatly appreciated, here. > > Martin McCormick > -- Shlomi Fish https://www.shlomifish.org/ Selina Mandrake - The Slayer (Buffy parody) - https://shlom.in/selina If the miller travelled to the market with Emma, they would have each rided their own donkey. Problem solved. — https://www.shlomifish.org/humour/bits/facts/Emma-Watson/ Please reply to list if it's a mailing list post - https://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Are there any ALSA Perl Modules?
On Sun, 2024-01-28 at 13:27 -0600, Martin McCormick wrote: > [...] > I may be looking in the wrong places but, so far, I seem > to be batting zeros when looking for perl and alsa together. > > Any good ideas are greatly appreciated, here. I would think that one nowadays would use (go through) pipewire for anything that involves recording and playing sounds. I've no clue how that would work, though. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Are there any ALSA Perl Modules?
Several years ago, I wrote some C code which turns one's computer's sound interface in to a sound-activated recorder that I could then connect to radio receivers or microphones and record when audio started and stop recording when there is nothing but silence. One essentially sets a sound card to record continuously but the sound samples go through code that knows what silence looks like. In short, silence looks like samples whose numeric value is exactly half-way between the lowest and highest voltage that the analog-to-digital converter reads, commonly either 32,767 representing silence, give or take a count or two due to digital sampling errors or decimal 128, hex 80 for 8-bit mono audio. The Advanced Linux Sound Architecture Project has C library functions for setting sample rates, mono, stereo, big or little endianness and 8 or 16-bit audio, whatever one needs for their application. One can even define samples as signed or unsigned integers. Once one gets a stream of ints which are usually 32-bits wide for stereo or 16-bit shorts for mono, the sound processing can begin which C is really good at but perl is just as good at so if one could get the same alsa modules which are used by aplay and arecord for setting up one's audio interfaces or sound cards, the manipulation of those data that was done in C could also be done in perl without hardly any modification to it at all. Perl has just the right mix of low-level logic and bitwise operators plus a much more easy-to-use string handling capability which is why I am asking this question. I may be looking in the wrong places but, so far, I seem to be batting zeros when looking for perl and alsa together. Any good ideas are greatly appreciated, here. Martin McCormick -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Modules
What modules and/or libraries are you using? Before you code do you block diagram and flowchart your programs? On Tue, Oct 24, 2023, 12:06 PM Levi Elias Nystad-Johansen via beginners < beginners@perl.org> wrote: > I use modules for complex things that I might get wrong. To re-use other > people's code is often better than to re-invent their solutions. > > https://metacpan.org/pod/WWW::Mechanize::Examples has some good examples > of useful scripts that are short and simple. > Imagine how hard it would be to write the same scripts without the module. > > When I have an issue that I think others must also have faced, I look for > a module to solve the issue. > > But I am critical to modules that are outdated/abandoned, heavy with many > dependencies, or unproven with few downloads etc. > > I also remove modules when I no longer need them. I find this easier with > App::cpanminus > > - L > > > > > > > Original Message > On 24. okt. 2023, 17:31, William Torrez Corea < willitc9...@gmail.com> > wrote: > > > When I must use modules and when I don't must use? > > I am working without modules, only i use: > >1. Subroutines >2. Control flow > > My programs are short and simple, they do not exceed 15 lines. I think > that I need more practice and learn more about Perl. I have limited > knowledge in Perl. > > -- > > With kindest regards, William. > > ⢀⣴⠾⠻⢶⣦⠀ > ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system > ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org > ⠈⠳⣄ > > >
Re: Modules
I use modules for complex things that I might get wrong. To re-use other people's code is often better than to re-invent their solutions. https://metacpan.org/pod/WWW::Mechanize::Examples has some good examples of useful scripts that are short and simple. Imagine how hard it would be to write the same scripts without the module. When I have an issue that I think others must also have faced, I look for a module to solve the issue. But I am critical to modules that are outdated/abandoned, heavy with many dependencies, or unproven with few downloads etc. I also remove modules when I no longer need them. I find this easier with App::cpanminus - L Original Message On 24. okt. 2023, 17:31, William Torrez Corea wrote: > When I must use modules and when I don't must use? > > I am working without modules, only i use: > > - Subroutines > - Control flow > > My programs are short and simple, they do not exceed 15 lines. I think that I > need more practice and learn more about Perl. I have limited knowledge in > Perl. > > -- > > With kindest regards, William. > > ⢀⣴⠾⠻⢶⣦⠀ > ⣾⠁⢠⠒⠀⣿⡁ Debian - The universal operating system > ⢿⡄⠘⠷⠚⠋⠀ https://www.debian.org > ⠈⠳⣄
Re: perlbrew and modules
> On Dec 7, 2017, at 3:39 PM, Andy Bachwrote: > > meaning, you added: > use lib q{/home/user/.cpanm/}; Well, no. That one didn't work. I had to be specific about where CGI::Carp was installed to get it to work: use lib '/home/user/.cpanm/work/1512448551.26554/CGI-4.38/lib'; > Right, so that's your 500 error. But you added the same line in the original > (before the use Carp line?) and it *didn't* fix the problem? Can you sym > link the .cpanm dir under one of those @INC dirs. Hm, there's also an > PERL5LIB env var you can set to add libraries (maybe in the webserver config). I've read about those, but I'd rather not jerry rig this install just to get it to work. I've been using perlbrew on my Mac (with 5 different perls) for years without incident, so that's why I'm at a loss as to what's happening on this VPS. Maybe I should just cut my losses, delete everything, and start over. I just hate doing that after spending so much time on something. It's like admitting defeat and giving up. ;) I just thought to compare the install on my Mac with the one on the VPS and the binaries of perlbrew are exactly the same, but the binaries for patchperl and cpanm are wildly different from each other. Are these customized during installation for the platform that running? If not, would it be safe to copy my known good copies over to the server (Mac vs Linux)? Frank -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: perlbrew and modules
>> I found a .cpanm directory in /home/user where all the modules are >> being installed. Could that have anything to do with it? I tried adding >> that directory with "use lib" but I still get the 500 error. > I ran your script and, when I manually include the .cpanm directory, it returns: /home/user/cgi-bin/test.pl syntax OK meaning, you added: use lib q{/home/user/.cpanm/}; > otherwise, it returns: Can't locate CGI/Carp.pm in @INC (you may need to install the CGI::Carp module) (@INC contains: /home/user/perl5/perlbrew/ perls/perl-5.26.1/lib/site_perl/5.26.1/x86_64-linux /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1 /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1/x86_64-linux /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1) at /home/user/cgi-bin/test.pl line 9. BEGIN failed--compilation aborted at /home/user/cgi-bin/test.pl line 9. Right, so that's your 500 error. But you added the same line in the original (before the use Carp line?) and it *didn't* fix the problem? Can you sym link the .cpanm dir under one of those @INC dirs. Hm, there's also an PERL5LIB env var you can set to add libraries (maybe in the webserver config). On Thu, Dec 7, 2017 at 5:29 PM, SSC_perl <p...@surfshopcart.com> wrote: > > On Dec 7, 2017, at 3:09 PM, Andy Bach <afb...@gmail.com> wrote: > > > > Can you not look a the web server's error_log? A 500 error would put > the perl error msg in there. Have you tried just "use" a different module? > > Those errors aren't appearing in the errors log in cPanel. I > couldn't find another error log in WHM. > > > Hmm, can you try... > > I ran your script and, when I manually include the .cpanm > directory, it returns: > > /home/user/cgi-bin/test.pl syntax OK > > otherwise, it returns: > > Can't locate CGI/Carp.pm in @INC (you may need to install the CGI::Carp > module) (@INC contains: /home/user/perl5/perlbrew/ > perls/perl-5.26.1/lib/site_perl/5.26.1/x86_64-linux > /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1 > /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1/x86_64-linux > /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1) at > /home/user/cgi-bin/test.pl line 9. BEGIN failed--compilation aborted at > /home/user/cgi-bin/test.pl line 9. > > > Here's more info. I ran the following command, which produced an > error: > > > perlbrew exec perl -e 'print $]' > Use of uninitialized value in list assignment at > /home/user/perl5/perlbrew/bin/perlbrew line 2220. > perl-5.26.1 > == > 5.026001 > > Looks like this has been reported for a few years without a > solution: > > https://rt.cpan.org/Public/Bug/Display.html?id=111978 > > Could this be part of the problem? I'm running perlbrew 0.80. > > Frank > > P.S. Re-installing cpanm didn't solve the problem. -- a Andy Bach, afb...@gmail.com 608 658-1890 cell 608 261-5738 wk
Re: perlbrew and modules
> On Dec 7, 2017, at 3:09 PM, Andy Bachwrote: > > Can you not look a the web server's error_log? A 500 error would put the > perl error msg in there. Have you tried just "use" a different module? Those errors aren't appearing in the errors log in cPanel. I couldn't find another error log in WHM. > Hmm, can you try... I ran your script and, when I manually include the .cpanm directory, it returns: /home/user/cgi-bin/test.pl syntax OK otherwise, it returns: Can't locate CGI/Carp.pm in @INC (you may need to install the CGI::Carp module) (@INC contains: /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1/x86_64-linux /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1 /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1/x86_64-linux /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1) at /home/user/cgi-bin/test.pl line 9. BEGIN failed--compilation aborted at /home/user/cgi-bin/test.pl line 9. Here's more info. I ran the following command, which produced an error: > perlbrew exec perl -e 'print $]' Use of uninitialized value in list assignment at /home/user/perl5/perlbrew/bin/perlbrew line 2220. perl-5.26.1 == 5.026001 Looks like this has been reported for a few years without a solution: https://rt.cpan.org/Public/Bug/Display.html?id=111978 Could this be part of the problem? I'm running perlbrew 0.80. Frank P.S. Re-installing cpanm didn't solve the problem. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: perlbrew and modules
> I've run into another strange problem that I don't understand. > Running the script below produces the output "Perl v5.26.1". However, if I > add the line: use CGI::Carp qw(fatalsToBrowser); it produces a 500 error. > > On the shared server, this worked as it should, with > 'fatalsToBrowser' showing any errors. Can you not look a the web server's error_log? A 500 error would put the perl error msg in there. Have you tried just "use" a different module? Hmm, can you try #!/home/user/perl5/perlbrew/perls/latest/bin/perl use v5.26; use warnings; use diagnostics; print "Content-type: text/html\n\n"; print `/home/user/perl5/perlbrew/perls/latest/bin/perl -c /path/to/my/cgi-bin/file 2>&1` , "\n"; in a different file? a On Thu, Dec 7, 2017 at 1:50 PM, SSC_perlwrote: > I've run into another strange problem that I don't understand. > Running the script below produces the output "Perl v5.26.1". However, if I > add the line: use CGI::Carp qw(fatalsToBrowser); it produces a 500 error. > > On the shared server, this worked as it should, with > 'fatalsToBrowser' showing any errors. But the VPS is just backwards - > adding it crashes the script! This actually happens with any module and, > yes, they are installed: > > > cpanm install CGI::Carp > install is up to date. (0.01) > CGI::Carp is up to date. (4.38) > > I have been fighting with this VPS setup for almost 2 weeks now > just to get a functioning modern Perl environment and I'm about at my wits > end. It shouldn't be this hard. > > I'd appreciate any help. > > Thanks, > Frank > > > > > #!/home/user/perl5/perlbrew/perls/latest/bin/perl > > use v5.26; > use warnings; > use diagnostics; > > print "Content-type: text/html\n\n"; > say 'Perl '. $^V; > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > > -- a Andy Bach, afb...@gmail.com 608 658-1890 cell 608 261-5738 wk
Re: perlbrew and modules
> On Dec 7, 2017, at 1:40 PM, Shlomi Fish <shlo...@shlomifish.org> wrote: > > you should make sure that the modules you wish to use are in one of the > dirs in @INC. cpanm should install to the global directories. Another question. How can I check to make sure cpanm was installed properly under perlbrew? Frank -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: perlbrew and modules
> On Dec 7, 2017, at 1:40 PM, Shlomi Fish <shlo...@shlomifish.org> wrote: > > you should make sure that the modules you wish to use are in one of the > dirs in @INC. cpanm should install to the global directories. That's what I thought. Shouldn't "cpanm install Module::Name" do that on it's own? There's only one perl install and one alias, and the alias is selected. Running "perl -v" returns version 5.26.1 so how can I get perlbrew set to install in the current installation? Frank -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: perlbrew and modules
On Thu, 7 Dec 2017 12:44:51 -0800 SSC_perl <p...@surfshopcart.com> wrote: > > On Dec 7, 2017, at 12:04 PM, Shlomi Fish <shlo...@shlomifish.org> wrote: > > > > What does: > > > > say "@INC"; > > > > say if you add it to the script? > > I get: > > /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1/x86_64-linux > /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1 > /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1/x86_64-linux > /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1 > > I found a .cpanm directory in /home/user where all the modules are > being installed. Could that have anything to do with it? I tried adding > that directory with "use lib" but I still get the 500 error. > you should make sure that the modules you wish to use are in one of the dirs in @INC. cpanm should install to the global directories. > Thanks, > Frank -- - Shlomi Fish http://www.shlomifish.org/ https://youtu.be/GoEn1YfYTBM - Tiffany Alvord - “Fall Together” Writing your own nirvana may be easier than writing a good blog engine ;) — http://is.gd/3Hh82T Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: perlbrew and modules
> On Dec 7, 2017, at 12:04 PM, Shlomi Fish <shlo...@shlomifish.org> wrote: > > What does: > > say "@INC"; > > say if you add it to the script? I get: /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1/x86_64-linux /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/site_perl/5.26.1 /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1/x86_64-linux /home/user/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1 I found a .cpanm directory in /home/user where all the modules are being installed. Could that have anything to do with it? I tried adding that directory with "use lib" but I still get the 500 error. Thanks, Frank -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: perlbrew and modules
On Thu, 7 Dec 2017 11:50:17 -0800 SSC_perlwrote: > I've run into another strange problem that I don't understand. > Running the script below produces the output "Perl v5.26.1". However, if I > add the line: use CGI::Carp qw(fatalsToBrowser); it produces a 500 error. > > On the shared server, this worked as it should, with > 'fatalsToBrowser' showing any errors. But the VPS is just backwards - adding > it crashes the script! This actually happens with any module and, yes, they > are installed: > > > cpanm install CGI::Carp > install is up to date. (0.01) > CGI::Carp is up to date. (4.38) > > I have been fighting with this VPS setup for almost 2 weeks now just > to get a functioning modern Perl environment and I'm about at my wits end. > It shouldn't be this hard. > > I'd appreciate any help. > > Thanks, > Frank > > > > > #!/home/user/perl5/perlbrew/perls/latest/bin/perl > > use v5.26; > use warnings; > use diagnostics; > > print "Content-type: text/html\n\n"; > say 'Perl '. $^V; Hi Frank! What does: say "@INC"; say if you add it to the script? -- - Shlomi Fish http://www.shlomifish.org/ The Case for File Swapping - http://shlom.in/file-swap Real men don’t listen to sentences that start with “Real men don’t”. — http://whatsup.org.il/article/6023 Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
perlbrew and modules
I've run into another strange problem that I don't understand. Running the script below produces the output "Perl v5.26.1". However, if I add the line: use CGI::Carp qw(fatalsToBrowser); it produces a 500 error. On the shared server, this worked as it should, with 'fatalsToBrowser' showing any errors. But the VPS is just backwards - adding it crashes the script! This actually happens with any module and, yes, they are installed: > cpanm install CGI::Carp install is up to date. (0.01) CGI::Carp is up to date. (4.38) I have been fighting with this VPS setup for almost 2 weeks now just to get a functioning modern Perl environment and I'm about at my wits end. It shouldn't be this hard. I'd appreciate any help. Thanks, Frank #!/home/user/perl5/perlbrew/perls/latest/bin/perl use v5.26; use warnings; use diagnostics; print "Content-type: text/html\n\n"; say 'Perl '. $^V; -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: cannot install modules
On Thu, Dec 22, 2016 at 3:56 PM, Luca Ferrariwrote: > What am I missing here? I found I had a mess configuration with PERL5_MB_OPT and PERL5_MM_OPT variables set to a different location respect to thos cpanm was installinga packages. Removing/unsetting the variables fixed the problem. Luca -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: cannot install modules
Check also this article ( nearing the issue I guess ) 22.12.2016 17:13, Andrew пишет: Not sure but check out or install libssl-dev ( root privs required ) 22.12.2016 16:56, Luca Ferrari пишет: Hi all, running perl 5.25.8 on kubuntu 16.10 via perlbrew I try to install Net::SCP but got this strange stuff: % cpanm Net::SCP ... Successfully installed Net-SSH-0.09 ... Successfully installed String-ShellQuote-1.04 ! Installing the dependencies failed: Module 'String::ShellQuote' is not installed, Module 'Net::SSH' is not installed ! Bailing out the installation for Net-SCP-0.08. 2 distributions installed so it seems that Net::SSH and String::ShellQuote are installed but not installed, uh? Even trying to install the dependencies manually provides an OK on installation but then Net::SCP fails with the same message. What am I missing here? Luca -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: cannot install modules
https://srcc.stanford.edu/farmshare2/software-perlbrew 22.12.2016 17:24, Andrew пишет: Check also this article ( nearing the issue I guess ) 22.12.2016 17:13, Andrew пишет: Not sure but check out or install libssl-dev ( root privs required ) 22.12.2016 16:56, Luca Ferrari пишет: Hi all, running perl 5.25.8 on kubuntu 16.10 via perlbrew I try to install Net::SCP but got this strange stuff: % cpanm Net::SCP ... Successfully installed Net-SSH-0.09 ... Successfully installed String-ShellQuote-1.04 ! Installing the dependencies failed: Module 'String::ShellQuote' is not installed, Module 'Net::SSH' is not installed ! Bailing out the installation for Net-SCP-0.08. 2 distributions installed so it seems that Net::SSH and String::ShellQuote are installed but not installed, uh? Even trying to install the dependencies manually provides an OK on installation but then Net::SCP fails with the same message. What am I missing here? Luca -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: cannot install modules
Not sure but check out or install libssl-dev ( root privs required ) 22.12.2016 16:56, Luca Ferrari пишет: Hi all, running perl 5.25.8 on kubuntu 16.10 via perlbrew I try to install Net::SCP but got this strange stuff: % cpanm Net::SCP ... Successfully installed Net-SSH-0.09 ... Successfully installed String-ShellQuote-1.04 ! Installing the dependencies failed: Module 'String::ShellQuote' is not installed, Module 'Net::SSH' is not installed ! Bailing out the installation for Net-SCP-0.08. 2 distributions installed so it seems that Net::SSH and String::ShellQuote are installed but not installed, uh? Even trying to install the dependencies manually provides an OK on installation but then Net::SCP fails with the same message. What am I missing here? Luca -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
cannot install modules
Hi all, running perl 5.25.8 on kubuntu 16.10 via perlbrew I try to install Net::SCP but got this strange stuff: % cpanm Net::SCP ... Successfully installed Net-SSH-0.09 ... Successfully installed String-ShellQuote-1.04 ! Installing the dependencies failed: Module 'String::ShellQuote' is not installed, Module 'Net::SSH' is not installed ! Bailing out the installation for Net-SCP-0.08. 2 distributions installed so it seems that Net::SSH and String::ShellQuote are installed but not installed, uh? Even trying to install the dependencies manually provides an OK on installation but then Net::SCP fails with the same message. What am I missing here? Luca -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Best way to install perl modules
Hi Benjamin, On Sun, 5 Oct 2014 17:39:46 +1300 Benjamin Fernandis benjo11...@gmail.com wrote: Hi Mike, Thanks for your kind response. I tried cpanm instead of cpan, but many times, it does not install require dependencies for module. For example, when i was trying to install cpanm XML::SAX - it failed and said no Fatal.pm module , then i manually first installed that module and then i tried to install XML::SAX and it works. It happens many times while installing different modules. I mean cpanm does not automatically fetch require dependencies for module. like yum in centos to install packages. Is there any tool or something like yum for perl module installations. Or Is there , I am missing anything ? The equivalents of yum in the Perl-world are cpan/CPAN.pm and cpanp/CPANPLUS.pm . Also see what I wrote about it here: * http://perl-begin.org/topics/cpan/ * http://perl-begin.org/topics/cpan/wrappers-for-distributions/ Note that the CentOS/RHEL/Fedora perl is suffering from several issues and the general wisdom is that you should install your own perl under a prefix using perlbrew - http://perlbrew.pl/ . Regards, Shlomi Fish -- - Shlomi Fish http://www.shlomifish.org/ Apple Inc. is Evil - http://www.shlomifish.org/open-source/anti/apple/ You can never truly appreciate The Gilmore Girls until you’ve watched it in the original Klingon. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Best way to install perl modules
Hi Shlomi, Thanks. I also feel that centos/rhel perl seems brokern in terms of dependencies issues and some others. Regards On Thu, Oct 9, 2014 at 9:12 PM, Shlomi Fish shlo...@shlomifish.org wrote: Hi Benjamin, On Sun, 5 Oct 2014 17:39:46 +1300 Benjamin Fernandis benjo11...@gmail.com wrote: Hi Mike, Thanks for your kind response. I tried cpanm instead of cpan, but many times, it does not install require dependencies for module. For example, when i was trying to install cpanm XML::SAX - it failed and said no Fatal.pm module , then i manually first installed that module and then i tried to install XML::SAX and it works. It happens many times while installing different modules. I mean cpanm does not automatically fetch require dependencies for module. like yum in centos to install packages. Is there any tool or something like yum for perl module installations. Or Is there , I am missing anything ? The equivalents of yum in the Perl-world are cpan/CPAN.pm and cpanp/CPANPLUS.pm . Also see what I wrote about it here: * http://perl-begin.org/topics/cpan/ * http://perl-begin.org/topics/cpan/wrappers-for-distributions/ Note that the CentOS/RHEL/Fedora perl is suffering from several issues and the general wisdom is that you should install your own perl under a prefix using perlbrew - http://perlbrew.pl/ . Regards, Shlomi Fish -- - Shlomi Fish http://www.shlomifish.org/ Apple Inc. is Evil - http://www.shlomifish.org/open-source/anti/apple/ You can never truly appreciate The Gilmore Girls until you’ve watched it in the original Klingon. Please reply to list if it's a mailing list post - http://shlom.in/reply .
Re: Best way to install perl modules
Take note at least on rehl, you have to run 'yum install perl perl-core' to get a full working perl (If I remember right). --Sam On 10/09/2014 04:11 AM, Benjamin Fernandis wrote: Hi Shlomi, Thanks. I also feel that centos/rhel perl seems brokern in terms of dependencies issues and some others. Regards On Thu, Oct 9, 2014 at 9:12 PM, Shlomi Fish shlo...@shlomifish.org mailto:shlo...@shlomifish.org wrote: Hi Benjamin, On Sun, 5 Oct 2014 17:39:46 +1300 Benjamin Fernandis benjo11...@gmail.com mailto:benjo11...@gmail.com wrote: Hi Mike, Thanks for your kind response. I tried cpanm instead of cpan, but many times, it does not install require dependencies for module. For example, when i was trying to install cpanm XML::SAX - it failed and said no Fatal.pm module , then i manually first installed that module and then i tried to install XML::SAX and it works. It happens many times while installing different modules. I mean cpanm does not automatically fetch require dependencies for module. like yum in centos to install packages. Is there any tool or something like yum for perl module installations. Or Is there , I am missing anything ? The equivalents of yum in the Perl-world are cpan/CPAN.pm and cpanp/CPANPLUS.pm . Also see what I wrote about it here: * http://perl-begin.org/topics/cpan/ * http://perl-begin.org/topics/cpan/wrappers-for-distributions/ Note that the CentOS/RHEL/Fedora perl is suffering from several issues and the general wisdom is that you should install your own perl under a prefix using perlbrew - http://perlbrew.pl/ . Regards, Shlomi Fish -- - Shlomi Fish http://www.shlomifish.org/ Apple Inc. is Evil - http://www.shlomifish.org/open-source/anti/apple/ You can never truly appreciate The Gilmore Girls until you’ve watched it in the original Klingon. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Best way to install perl modules
Hi Benjamin, On Thu, 9 Oct 2014 22:11:41 +1300 Benjamin Fernandis benjo11...@gmail.com wrote: Hi Shlomi, Thanks. I also feel that centos/rhel perl seems brokern in terms of dependencies issues and some others. You're welcome. Regards, Shlomi Fish -- - Shlomi Fish http://www.shlomifish.org/ http://www.shlomifish.org/humour/bits/Google-Discontinues-Services/ Botje Khisanth =~ s/must sleep/must give Botje all my money/ . — Freenode’s #perl Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Best way to install perl modules
Hi, Today I face same previous problem to install package with cpanm. This time i have already installed Development Tools as suggested by Sam. For testing it more, i was trying to install dancer by cpanm. First trial, i got failed and then looked into build log and found some dependent modules are not there so then i tried to first install them and those also have some more dependencies and then i have to resolve first from those and then step by step do install manually and lastly dancer installation works for me. Below is my manually package installation. Please suggest me to resolve this installation problem. Also suggest me if I am missing anything at OS level. OS : cenots 7 Regards Ben cpanm Dancer 334 335 vim /root/.cpanm/work/1412646550.26687/build.log 336 337 cpanm HTTP::Server::Simple 338 vim /root/.cpanm/work/1412646612.26849/build.log 339 cpanm Test::Pod 340 cpanm HTTP::Server::Simple 341 vim /root/.cpanm/work/1412646658.27040/build.log 342 cpanm Test::Pod::Coverage 343 cpanm HTTP::Server::Simple 344 vim /root/.cpanm/work/1412646703.27571/build.log 345 cpanm HTTP::Server 346 cpanm Env 347 cpanm HTTP::Server::Simple 348 cpanm Dancer 349 instmodsh 350 history On Sun, Oct 5, 2014 at 6:17 PM, Benjamin Fernandis benjo11...@gmail.com wrote: Hi, Sam, Thanks, After installing development tools group, it works. Regards Ben On Sun, Oct 5, 2014 at 6:02 PM, Sam p...@net153.net wrote: You probably need to give us more info as both cpan and cpanm will auto resolve and install needed dependencies. The dependency installs could be failing because a compiler or something similar is missing. If you are on a redhat based system, trying running: yum groupinstall Development Tools If you are on a debian based system try running: aptitude install build-essential --Sam On 10/04/2014 11:39 PM, Benjamin Fernandis wrote: Hi Mike, Thanks for your kind response. I tried cpanm instead of cpan, but many times, it does not install require dependencies for module. For example, when i was trying to install cpanm XML::SAX - it failed and said no Fatal.pm module , then i manually first installed that module and then i tried to install XML::SAX and it works. It happens many times while installing different modules. I mean cpanm does not automatically fetch require dependencies for module. like yum in centos to install packages. Is there any tool or something like yum for perl module installations. Or Is there , I am missing anything ? Regards Ben On Sun, Oct 5, 2014 at 2:51 PM, Mike ekimduna...@gmail.com mailto:ekimduna...@gmail.com wrote: Use cpanminus. To install: sudo curl -L http://cpanmin.us | perl - --sudo App::cpanminus To use: sudo cpanm module to install Here's the official documentation: http://search.cpan.org/~miyagawa/App-cpanminus-1.7012/ lib/App/cpanminus.pm On 10/4/14, 8:32 PM, Benjamin Fernandis wrote: Hi, Many times I face problem with module installation and then have to go to google and apply trial and error to resolve this permanently, could u please suggest me best and correct method to get resolved it? i mean if i installed centos 7 freshly then what are pre-requisites from OS side to get perl module installation successfully. What steps require to follow? Previously i tried cpanm and cpan console but some times faced installation faild error. Is there any specific guideline to resolve this problem? I am using centos based distro. Regards Ben -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Best way to install perl modules
Please provide us with any errors from the installation log you've received when using cpanm. On 10/06/2014 08:58 PM, Benjamin Fernandis wrote: Hi, Today I face same previous problem to install package with cpanm. This time i have already installed Development Tools as suggested by Sam. For testing it more, i was trying to install dancer by cpanm. First trial, i got failed and then looked into build log and found some dependent modules are not there so then i tried to first install them and those also have some more dependencies and then i have to resolve first from those and then step by step do install manually and lastly dancer installation works for me. Below is my manually package installation. Please suggest me to resolve this installation problem. Also suggest me if I am missing anything at OS level. OS : cenots 7 Regards Ben cpanm Dancer 334 335 vim /root/.cpanm/work/1412646550.26687/build.log 336 337 cpanm HTTP::Server::Simple 338 vim /root/.cpanm/work/1412646612.26849/build.log 339 cpanm Test::Pod 340 cpanm HTTP::Server::Simple 341 vim /root/.cpanm/work/1412646658.27040/build.log 342 cpanm Test::Pod::Coverage 343 cpanm HTTP::Server::Simple 344 vim /root/.cpanm/work/1412646703.27571/build.log 345 cpanm HTTP::Server 346 cpanm Env 347 cpanm HTTP::Server::Simple 348 cpanm Dancer 349 instmodsh 350 history On Sun, Oct 5, 2014 at 6:17 PM, Benjamin Fernandis benjo11...@gmail.com mailto:benjo11...@gmail.com wrote: Hi, Sam, Thanks, After installing development tools group, it works. Regards Ben On Sun, Oct 5, 2014 at 6:02 PM, Sam p...@net153.net mailto:p...@net153.net wrote: You probably need to give us more info as both cpan and cpanm will auto resolve and install needed dependencies. The dependency installs could be failing because a compiler or something similar is missing. If you are on a redhat based system, trying running: yum groupinstall Development Tools If you are on a debian based system try running: aptitude install build-essential --Sam On 10/04/2014 11:39 PM, Benjamin Fernandis wrote: Hi Mike, Thanks for your kind response. I tried cpanm instead of cpan, but many times, it does not install require dependencies for module. For example, when i was trying to install cpanm XML::SAX - it failed and said no Fatal.pm module , then i manually first installed that module and then i tried to install XML::SAX and it works. It happens many times while installing different modules. I mean cpanm does not automatically fetch require dependencies for module. like yum in centos to install packages. Is there any tool or something like yum for perl module installations. Or Is there , I am missing anything ? Regards Ben On Sun, Oct 5, 2014 at 2:51 PM, Mike ekimduna...@gmail.com mailto:ekimduna...@gmail.com mailto:ekimduna...@gmail.com mailto:ekimduna...@gmail.com wrote: Use cpanminus. To install: sudo curl -L http://cpanmin.us | perl - --sudo App::cpanminus To use: sudo cpanm module to install Here's the official documentation: http://search.cpan.org/~miyagawa/App-cpanminus-1.7012/lib/App/cpanminus.pm http://search.cpan.org/%7Emiyagawa/App-cpanminus-1.7012/lib/App/cpanminus.pm On 10/4/14, 8:32 PM, Benjamin Fernandis wrote: Hi, Many times I face problem with module installation and then have to go to google and apply trial and error to resolve this permanently, could u please suggest me best and correct method to get resolved it? i mean if i installed centos 7 freshly then what are pre-requisites from OS side to get perl module installation successfully. What steps require to follow? Previously i tried cpanm and cpan console but some times faced installation faild error. Is there any specific guideline to resolve this problem? I am using centos based distro. Regards Ben -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org mailto:beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org mailto:beginners-h...@perl.org http
Re: Best way to install perl modules
+ Attaching log file. On Tue, Oct 7, 2014 at 2:59 PM, Mike ekimduna...@gmail.com wrote: Please provide us with any errors from the installation log you've received when using cpanm. On 10/06/2014 08:58 PM, Benjamin Fernandis wrote: Hi, Today I face same previous problem to install package with cpanm. This time i have already installed Development Tools as suggested by Sam. For testing it more, i was trying to install dancer by cpanm. First trial, i got failed and then looked into build log and found some dependent modules are not there so then i tried to first install them and those also have some more dependencies and then i have to resolve first from those and then step by step do install manually and lastly dancer installation works for me. Below is my manually package installation. Please suggest me to resolve this installation problem. Also suggest me if I am missing anything at OS level. OS : cenots 7 Regards Ben cpanm Dancer 334 335 vim /root/.cpanm/work/1412646550.26687/build.log 336 337 cpanm HTTP::Server::Simple 338 vim /root/.cpanm/work/1412646612.26849/build.log 339 cpanm Test::Pod 340 cpanm HTTP::Server::Simple 341 vim /root/.cpanm/work/1412646658.27040/build.log 342 cpanm Test::Pod::Coverage 343 cpanm HTTP::Server::Simple 344 vim /root/.cpanm/work/1412646703.27571/build.log 345 cpanm HTTP::Server 346 cpanm Env 347 cpanm HTTP::Server::Simple 348 cpanm Dancer 349 instmodsh 350 history On Sun, Oct 5, 2014 at 6:17 PM, Benjamin Fernandis benjo11...@gmail.com wrote: Hi, Sam, Thanks, After installing development tools group, it works. Regards Ben On Sun, Oct 5, 2014 at 6:02 PM, Sam p...@net153.net wrote: You probably need to give us more info as both cpan and cpanm will auto resolve and install needed dependencies. The dependency installs could be failing because a compiler or something similar is missing. If you are on a redhat based system, trying running: yum groupinstall Development Tools If you are on a debian based system try running: aptitude install build-essential --Sam On 10/04/2014 11:39 PM, Benjamin Fernandis wrote: Hi Mike, Thanks for your kind response. I tried cpanm instead of cpan, but many times, it does not install require dependencies for module. For example, when i was trying to install cpanm XML::SAX - it failed and said no Fatal.pm module , then i manually first installed that module and then i tried to install XML::SAX and it works. It happens many times while installing different modules. I mean cpanm does not automatically fetch require dependencies for module. like yum in centos to install packages. Is there any tool or something like yum for perl module installations. Or Is there , I am missing anything ? Regards Ben On Sun, Oct 5, 2014 at 2:51 PM, Mike ekimduna...@gmail.com mailto:ekimduna...@gmail.com wrote: Use cpanminus. To install: sudo curl -L http://cpanmin.us | perl - --sudo App::cpanminus To use: sudo cpanm module to install Here's the official documentation: http://search.cpan.org/~miyagawa/App-cpanminus-1.7012/lib/App/cpanminus.pm On 10/4/14, 8:32 PM, Benjamin Fernandis wrote: Hi, Many times I face problem with module installation and then have to go to google and apply trial and error to resolve this permanently, could u please suggest me best and correct method to get resolved it? i mean if i installed centos 7 freshly then what are pre-requisites from OS side to get perl module installation successfully. What steps require to follow? Previously i tried cpanm and cpan console but some times faced installation faild error. Is there any specific guideline to resolve this problem? I am using centos based distro. Regards Ben -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ vim /root/.cpanm/work/1412646703.27571/build.log cpanm (App::cpanminus) 1.7012 on perl 5.016003 built for x86_64-linux-thread-multi Work directory is /root/.cpanm/work/1412646703.27571 You have make /usr/bin/make You have LWP 6.08 You have /usr/bin/tar: tar (GNU tar) 1.26 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html. This is free software: you are free to change and redistribute it. You have /usr/bin/unzip Searching HTTP::Server::Simple on cpanmetadb ... -- Working on HTTP::Server::Simple Fetching http://www.cpan.org/authors/id/J/JE/JESSE/HTTP-Server-Simple-0.44.tar.gz - OK Unpacking HTTP-Server-Simple-0.44.tar.gz Entering HTTP-Server-Simple-0.44 Checking configure dependencies from META.yml Checking if you have ExtUtils::MakeMaker 6.42 ... Yes (6.68) Configuring HTTP-Server-Simple-0.44 Running Makefile.PL Checking if your kit
Re: Best way to install perl modules
On 7 October 2014 16:07, Benjamin Fernandis benjo11...@gmail.com wrote: + Attaching log file. Lacking Env.pm basically means your vendor's Perl is broken. Env.pm is shipped with Perl itself, and subsequently things may forget to depend on it ( at least, in a way that cpan tools recognise ) and be silently broken as a consequence. It *might* be worth filing a bug with the respective packages saying hey, you need Env.pm, but dont depend on it But the thing that will make life easiest for you is working out why you don't have things installed that are EXPECTED to be installed as part of a standard perl installation. But the general problem is, sometimes people in Perl have external dependencies and forget to declare them as such. When they do that, things break. When things break like that, if you're sure the problem is them failing to declare the dependency, then you file a bug requesting they declare the dependency. Once the dependency is declared, CPAN, CPANPLUS and cpanm will detect and respond to it. -- Kent *KENTNL* - https://metacpan.org/author/KENTNL
Best way to install perl modules
Hi, Many times I face problem with module installation and then have to go to google and apply trial and error to resolve this permanently, could u please suggest me best and correct method to get resolved it? i mean if i installed centos 7 freshly then what are pre-requisites from OS side to get perl module installation successfully. What steps require to follow? Previously i tried cpanm and cpan console but some times faced installation faild error. Is there any specific guideline to resolve this problem? I am using centos based distro. Regards Ben
Re: Best way to install perl modules
Use cpanminus. To install: sudo curl -L http://cpanmin.us | perl - --sudo App::cpanminus To use: sudo cpanm module to install Here's the official documentation: http://search.cpan.org/~miyagawa/App-cpanminus-1.7012/lib/App/cpanminus.pm On 10/4/14, 8:32 PM, Benjamin Fernandis wrote: Hi, Many times I face problem with module installation and then have to go to google and apply trial and error to resolve this permanently, could u please suggest me best and correct method to get resolved it? i mean if i installed centos 7 freshly then what are pre-requisites from OS side to get perl module installation successfully. What steps require to follow? Previously i tried cpanm and cpan console but some times faced installation faild error. Is there any specific guideline to resolve this problem? I am using centos based distro. Regards Ben
Re: Best way to install perl modules
Hi Mike, Thanks for your kind response. I tried cpanm instead of cpan, but many times, it does not install require dependencies for module. For example, when i was trying to install cpanm XML::SAX - it failed and said no Fatal.pm module , then i manually first installed that module and then i tried to install XML::SAX and it works. It happens many times while installing different modules. I mean cpanm does not automatically fetch require dependencies for module. like yum in centos to install packages. Is there any tool or something like yum for perl module installations. Or Is there , I am missing anything ? Regards Ben On Sun, Oct 5, 2014 at 2:51 PM, Mike ekimduna...@gmail.com wrote: Use cpanminus. To install: sudo curl -L http://cpanmin.us | perl - --sudo App::cpanminus To use: sudo cpanm module to install Here's the official documentation: http://search.cpan.org/~miyagawa/App-cpanminus-1.7012/lib/App/cpanminus.pm On 10/4/14, 8:32 PM, Benjamin Fernandis wrote: Hi, Many times I face problem with module installation and then have to go to google and apply trial and error to resolve this permanently, could u please suggest me best and correct method to get resolved it? i mean if i installed centos 7 freshly then what are pre-requisites from OS side to get perl module installation successfully. What steps require to follow? Previously i tried cpanm and cpan console but some times faced installation faild error. Is there any specific guideline to resolve this problem? I am using centos based distro. Regards Ben
Re: Best way to install perl modules
You probably need to give us more info as both cpan and cpanm will auto resolve and install needed dependencies. The dependency installs could be failing because a compiler or something similar is missing. If you are on a redhat based system, trying running: yum groupinstall Development Tools If you are on a debian based system try running: aptitude install build-essential --Sam On 10/04/2014 11:39 PM, Benjamin Fernandis wrote: Hi Mike, Thanks for your kind response. I tried cpanm instead of cpan, but many times, it does not install require dependencies for module. For example, when i was trying to install cpanm XML::SAX - it failed and said no Fatal.pm module , then i manually first installed that module and then i tried to install XML::SAX and it works. It happens many times while installing different modules. I mean cpanm does not automatically fetch require dependencies for module. like yum in centos to install packages. Is there any tool or something like yum for perl module installations. Or Is there , I am missing anything ? Regards Ben On Sun, Oct 5, 2014 at 2:51 PM, Mike ekimduna...@gmail.com mailto:ekimduna...@gmail.com wrote: Use cpanminus. To install: sudo curl -L http://cpanmin.us | perl - --sudo App::cpanminus To use: sudo cpanm module to install Here's the official documentation: http://search.cpan.org/~miyagawa/App-cpanminus-1.7012/lib/App/cpanminus.pm On 10/4/14, 8:32 PM, Benjamin Fernandis wrote: Hi, Many times I face problem with module installation and then have to go to google and apply trial and error to resolve this permanently, could u please suggest me best and correct method to get resolved it? i mean if i installed centos 7 freshly then what are pre-requisites from OS side to get perl module installation successfully. What steps require to follow? Previously i tried cpanm and cpan console but some times faced installation faild error. Is there any specific guideline to resolve this problem? I am using centos based distro. Regards Ben -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Best way to install perl modules
Hi, Sam, Thanks, After installing development tools group, it works. Regards Ben On Sun, Oct 5, 2014 at 6:02 PM, Sam p...@net153.net wrote: You probably need to give us more info as both cpan and cpanm will auto resolve and install needed dependencies. The dependency installs could be failing because a compiler or something similar is missing. If you are on a redhat based system, trying running: yum groupinstall Development Tools If you are on a debian based system try running: aptitude install build-essential --Sam On 10/04/2014 11:39 PM, Benjamin Fernandis wrote: Hi Mike, Thanks for your kind response. I tried cpanm instead of cpan, but many times, it does not install require dependencies for module. For example, when i was trying to install cpanm XML::SAX - it failed and said no Fatal.pm module , then i manually first installed that module and then i tried to install XML::SAX and it works. It happens many times while installing different modules. I mean cpanm does not automatically fetch require dependencies for module. like yum in centos to install packages. Is there any tool or something like yum for perl module installations. Or Is there , I am missing anything ? Regards Ben On Sun, Oct 5, 2014 at 2:51 PM, Mike ekimduna...@gmail.com mailto:ekimduna...@gmail.com wrote: Use cpanminus. To install: sudo curl -L http://cpanmin.us | perl - --sudo App::cpanminus To use: sudo cpanm module to install Here's the official documentation: http://search.cpan.org/~miyagawa/App-cpanminus-1.7012/ lib/App/cpanminus.pm On 10/4/14, 8:32 PM, Benjamin Fernandis wrote: Hi, Many times I face problem with module installation and then have to go to google and apply trial and error to resolve this permanently, could u please suggest me best and correct method to get resolved it? i mean if i installed centos 7 freshly then what are pre-requisites from OS side to get perl module installation successfully. What steps require to follow? Previously i tried cpanm and cpan console but some times faced installation faild error. Is there any specific guideline to resolve this problem? I am using centos based distro. Regards Ben -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Impossible to install Perl modules
It's strongly recommended to use Cpanminus, that will make your life easier. Also, take a look at local::lib and eventually Perlbrew. https://metacpan.org/pod/local::lib http://perlbrew.pl/ ~$bast1 On Tue, Jul 8, 2014 at 8:59 PM, Sam p...@net153.net wrote: On 07/08/2014 05:07 AM, Bob Sauvage wrote: Hi there, I'm not able to install any perl modules on one of my RedHat 6.5 servers. Hereunder the issue: [root@xxx jmx4perl-1.10]#cpan Config::General CPAN: Storable loaded ok (v2.20) Going to read '/root/.cpan/Metadata' Database was generated on Tue, 08 Jul 2014 07:29:02 GMT Running install for module 'Config::General' CPAN: YAML loaded ok (v0.90) Running make for T/TL/TLINDEN/Config-General-2.56.tar.gz CPAN: Digest::SHA loaded ok (v5.47) CPAN: Compress::Zlib loaded ok (v2.021) Checksum for /root/.cpan/sources/authors/id/T/TL/TLINDEN/Config-General-2.56.tar.gz ok CPAN: Archive::Tar loaded ok (v1.58) Config-General-2.56/ [...] CPAN: File::Temp loaded ok (v0.22) CPAN.pm: Going to build T/TL/TLINDEN/Config-General-2.56.tar.gz Checking if your kit is complete... Looks good *CPAN::Meta::YAML 0.011 is not available at /usr/local/share/perl5/CPAN/Meta.pm line 613* Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site] TLINDEN/Config-General-2.56.tar.gz /usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK Running make test Make had some problems, won't test Running make install Make had some problems, won't install I encounter this error with all perl modules... Even if I try to build CPAN::Meta::YAML 0.011 from source: [root@xxx CPAN-Meta-YAML-0.011]# perl Makefile.PL Checking if your kit is complete... Looks good *CPAN::Meta::YAML 0.011 is not available at /usr/local/share/perl5/CPAN/Meta.pm line 613* Could you help me please ? Thanks, Bob ! -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ Try cpanminus: wget -O cpanm http://cpanmin.us chmod +x cpanm ./cpanm big list of your favorite modules here Also note on redhat, they did weird stuff with system perl. The perl package on redhat will give you nothing more than /usr/bin/perl For the default modules (perhaps YAML?) that are supposed to be distributed with perl, install perl-core --Sam -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Impossible to install Perl modules
Hi there, Im not able to install any perl modules on one of my RedHat 6.5 servers. Hereunder the issue: [root@xxx jmx4perl-1.10]#cpan Config::General CPAN: Storable loaded ok (v2.20) Going to read /root/.cpan/Metadata Database was generated on Tue, 08 Jul 2014 07:29:02 GMT Running install for module Config::General CPAN: YAML loaded ok (v0.90) Running make for T/TL/TLINDEN/Config-General-2.56.tar.gz CPAN: Digest::SHA loaded ok (v5.47) CPAN: Compress::Zlib loaded ok (v2.021) Checksum for /root/.cpan/sources/authors/id/T/TL/TLINDEN/Config-General-2.56.tar.gz ok CPAN: Archive::Tar loaded ok (v1.58) Config-General-2.56/ [...] CPAN: File::Temp loaded ok (v0.22) CPAN.pm: Going to build T/TL/TLINDEN/Config-General-2.56.tar.gz Checking if your kit is complete... Looks good CPAN::Meta::YAML 0.011 is not available at /usr/local/share/perl5/CPAN/Meta.pm line 613 Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site] TLINDEN/Config-General-2.56.tar.gz /usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK Running make test Make had some problems, wont test Running make install Make had some problems, wont install I encounter this error with all perl modules... Even if I try to build CPAN::Meta::YAML 0.011 from source: [root@xxx CPAN-Meta-YAML-0.011]# perl Makefile.PL Checking if your kit is complete... Looks good CPAN::Meta::YAML 0.011 is not available at /usr/local/share/perl5/CPAN/Meta.pm line 613 Could you help me please ? Thanks, Bob ! -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Impossible to install Perl modules
On 07/08/2014 05:07 AM, Bob Sauvage wrote: Hi there, I'm not able to install any perl modules on one of my RedHat 6.5 servers. Hereunder the issue: [root@xxx jmx4perl-1.10]#cpan Config::General CPAN: Storable loaded ok (v2.20) Going to read '/root/.cpan/Metadata' Database was generated on Tue, 08 Jul 2014 07:29:02 GMT Running install for module 'Config::General' CPAN: YAML loaded ok (v0.90) Running make for T/TL/TLINDEN/Config-General-2.56.tar.gz CPAN: Digest::SHA loaded ok (v5.47) CPAN: Compress::Zlib loaded ok (v2.021) Checksum for /root/.cpan/sources/authors/id/T/TL/TLINDEN/Config-General-2.56.tar.gz ok CPAN: Archive::Tar loaded ok (v1.58) Config-General-2.56/ [...] CPAN: File::Temp loaded ok (v0.22) CPAN.pm: Going to build T/TL/TLINDEN/Config-General-2.56.tar.gz Checking if your kit is complete... Looks good *CPAN::Meta::YAML 0.011 is not available at /usr/local/share/perl5/CPAN/Meta.pm line 613* Warning: No success on command[/usr/bin/perl Makefile.PL INSTALLDIRS=site] TLINDEN/Config-General-2.56.tar.gz /usr/bin/perl Makefile.PL INSTALLDIRS=site -- NOT OK Running make test Make had some problems, won't test Running make install Make had some problems, won't install I encounter this error with all perl modules... Even if I try to build CPAN::Meta::YAML 0.011 from source: [root@xxx CPAN-Meta-YAML-0.011]# perl Makefile.PL Checking if your kit is complete... Looks good *CPAN::Meta::YAML 0.011 is not available at /usr/local/share/perl5/CPAN/Meta.pm line 613* Could you help me please ? Thanks, Bob ! -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ Try cpanminus: wget -O cpanm http://cpanmin.us chmod +x cpanm ./cpanm big list of your favorite modules here Also note on redhat, they did weird stuff with system perl. The perl package on redhat will give you nothing more than /usr/bin/perl For the default modules (perhaps YAML?) that are supposed to be distributed with perl, install perl-core --Sam -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Teach script to look for modules in the same prefix when using MakeMaker
On Sun, 15 Jun 2014 20:37:55 +0200 drupsspen drupss...@gmail.com wrote: I'm building an application in Perl and is looking into using a build system for it. So far I've looked at ExtUtils::MakeMaker. I have divided my application like this: bin/foo lib/Foo/Bar.pm lib/Foo/Baz.pm The user runs the program by invoking foo, which is an executable defined in EXE_FILES. Most of the application is however located in lib/Foo and is imported by foo. The problem that I have is that I want to allow the user to install the program in any directory by specifying PREFIX=/some/path when running my Makefile.PL. It won't find the installed modules from lib unless it's installed in a path where perl already looks for them. So what I need is a way to make foo tell perl where to look for modules. Is there a way to do this? You want use lib - in particular, to say look in a directory named lib, under the current directory, you can say just: use lib './lib'; (in fact, use lib 'lib' would be enough, but I think it's mildly clearer with the ./ notation) -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Teach script to look for modules in the same prefix when using MakeMaker
Hello. I'm building an application in Perl and is looking into using a build system for it. So far I've looked at ExtUtils::MakeMaker. I have divided my application like this: bin/foo lib/Foo/Bar.pm lib/Foo/Baz.pm The user runs the program by invoking foo, which is an executable defined in EXE_FILES. Most of the application is however located in lib/Foo and is imported by foo. The problem that I have is that I want to allow the user to install the program in any directory by specifying PREFIX=/some/path when running my Makefile.PL. It won't find the installed modules from lib unless it's installed in a path where perl already looks for them. So what I need is a way to make foo tell perl where to look for modules. Is there a way to do this? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: web scraper modules
Hi Octavian, Thanks for the suggestions. Mike On Wed, Feb 19, 2014 at 02:22:41PM +0200, Octavian Rasnita wrote: snip CSS is just a subset of XPath, so it is not as advanced, but it has a nicer syntax, so if you have a good CSS knowledge, you may use other scrapers like: WWW::Mechanize::Query Web::Scraper Scrappy::Scraper::Parser Mojo::UserAgent All of them do the same thing, so it depends which type of syntax do you like the most. Octavian -- The only way that problems get solved in real life is with a lot of hard work on getting the details right. - Linus Torvalds -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
web scraper modules
Hi, A few years ago I wrote a script to search a couple of dozen sites like CalJobs, craigslist, Dice, Indeed, several temp agencies in the area and a few of the major companies who use electronics techs for jobs I might care to apply for. At the time I used LWP::Simple, LWP::UserAgent, HTML::TreeBuilder, WWW::Mechanize HTTP::Cookies but many of the sites have modified their pages so that my program needs to be rewritten. I'm wondering if anyone has suggestions of modules that make this sort of task easier. Thanks, Mike -- Keep in mind ... stressed spelled backwards is desserts. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: web scraper modules
From: Mike McClain mike.j...@nethere.com Hi, A few years ago I wrote a script to search a couple of dozen sites like CalJobs, craigslist, Dice, Indeed, several temp agencies in the area and a few of the major companies who use electronics techs for jobs I might care to apply for. At the time I used LWP::Simple, LWP::UserAgent, HTML::TreeBuilder, WWW::Mechanize HTTP::Cookies but many of the sites have modified their pages so that my program needs to be rewritten. I'm wondering if anyone has suggestions of modules that make this sort of task easier. Thanks, Mike Which part of the process do you find hard and want to make easier? The process has 2 important parts: - downloading the pages - scraping them To download, Mechanize is good because it is higher level and offers some helpful methods, but it won't help you if those pages are hard to get... if they use a kind of anti-scraping protection. In that case LWP is better, but Mechanize can use LWP's methods. For scraping the content, HTML::TreeBuilder is very good. If you have a good XPath knowledge you may find helpful HTML::TreeBuilder::XPath. CSS is just a subset of XPath, so it is not as advanced, but it has a nicer syntax, so if you have a good CSS knowledge, you may use other scrapers like: WWW::Mechanize::Query Web::Scraper Scrappy::Scraper::Parser Mojo::UserAgent All of them do the same thing, so it depends which type of syntax do you like the most. Octavian -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: modules
Hi Jim, thanks for replying to Ray. See below for my comments. On Mon, 3 Jun 2013 16:18:53 -0700 Jim Gibson jimsgib...@gmail.com wrote: On Jun 3, 2013, at 4:01 PM, Rahim Fakir wrote: Iam using win 7 64bits, and i downloaded Strawberry, and I use Perl PAckage Manager to install modules, insted of Cpan command. I know how to install them, but I need instrucions how to use them, step by step, how-to run the modules. Each module is used differently. Almost all modules can be included in your program with the statement (usually near the beginning of your program): use Module; where you substitute the name of the module you are going to use for Module. This statement imports the module's program statements into your program. This happens at compile time, no matter where in your program you actually put the 'use' statement. You can also import modules using 'do' or 'require', but you need to know what those do and why to use them before you use them instead of 'use'. Modules come in two flavors: procedural and object-oriented. Some modules support both flavors. Most modules come with built-in documentation that describes how to use them, usually including some sample code statements. To access the documentation, you can do the following on a command-line: perldoc Module Strawberry Perl may afford another way of accessing documentation. Procedural modules will import functions into your namespace, so you can just call these functions as if they were part of built-in Perl or part of your own program. Well, it is a good idea to explicitly import these subroutines to avoid having to hunt where these subroutines are coming from: So you do: use Module qw( func1 func2 func3 ); Instead of: use Module; Object-oriented modules allow you to create objects of the module class, and call methods of those objects. To create an object instance of the Module class: my $object = Module-new(); The new() method is a convention. It could be called anything, but most OO modules use a new() method for object creation, Some new() methods take arguments. To call a method on the object: $object-method(); See the documentation for each module to find out what functions and methods are available. There are Perl tutorials for using modules and doing object-oriented programming: perldoc perlmod perldoc perlmodlib perldoc perlmodstyle perldoc perlmodinstall perldoc perlboot perldoc perltoot perldoc perltooc perlboot, perltoot and perltooc have been deprecated and deleted from the Perl documentation. See: http://perldoc.perl.org/perlboot.html You should use http://perldoc.perl.org/perlootut.html and http://perldoc.perl.org/perlobj.html instead. For more resources see: http://perl-begin.org/topics/object-oriented/ (a link to my site) Thanks again. Regards, Shlomi Fish -- - Shlomi Fish http://www.shlomifish.org/ Chuck Norris/etc. Facts - http://www.shlomifish.org/humour/bits/facts/ When Chuck Norris uses Gentoo, “emerge kde” finishes in under a minute. A computer cannot afford to keep Chuck waiting for too long. — http://www.shlomifish.org/humour/bits/facts/Chuck-Norris/ Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: modules
Hi Michael, On Mon, 3 Jun 2013 16:38:25 -0700 Michael Rasmussen mich...@jamhome.us wrote: On Tue, Jun 04, 2013 at 12:01:09AM +0100, Rahim Fakir wrote: Iam using win 7 64bits, and i downloaded Strawberry, and I use Perl PAckage Manager to install modules, insted of Cpan command. I know how to install them, but I need instrucions how to use them, step by step, how-to run the modules. Best regards Ray Hi Ray, So, I assume you downloaded whatever modules you chose to because you wanted the whatever functionality they provide. Since I don't know _what_ modules you chose I'll give an imaginary example and then a specific example from a favorite module I use. Having said that: The CPAN page for a module always includes a SYNOPSIS - this gives a very terse example of using the module. Check there. For our example I'll use the fictional raspberry.pm. It's synopsis reads; use raspberry; my $answer = raspberry(); Just a note - you should not call your modules or packages with an initial lowercase letter, as this is reserved for pragmas: http://perl-begin.org/tutorials/bad-elements/#lowercase_modules_and_pkgs (link to a page I created). The description says: raspberry returns a line from the raspberry wisdom list. In your code then it might be used: #!/usr/bin/perl use warnings; use strict; use raspberry; # the use line incorporates the module code into your program my $answer = raspberry(); # the function call uses code from the module that you didn't write print $answer, $/; and the output might be something like Raspberries are delicious! Eat some soon to feel good! Now for a specific, real world example: #!/usr/bin/perl use Data::Dumper; You forgot strict and warnings. [ imagine a bunch of code that does something, but you don't quite know what] [ someone else wrote it, and it's now time for you to fix a problem ] [ there's a huge complex data structure that hash of arrays or a hash of hashes or ...? ] print Dumper( \%my_hash_with_who_knows_what ): Regards, Shlomi Fish -- - Shlomi Fish http://www.shlomifish.org/ Free (Creative Commons) Music Downloads, Reviews and more - http://jamendo.com/ One thing I could never understand is why in Microsoft Word, it often happens that I press enter… and the font changes. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
modules
Iam using win 7 64bits, and i downloaded Strawberry, and I use Perl PAckage Manager to install modules, insted of Cpan command. I know how to install them, but I need instrucions how to use them, step by step, how-to run the modules. Best regards Ray
Re: modules
On Jun 3, 2013, at 4:01 PM, Rahim Fakir wrote: Iam using win 7 64bits, and i downloaded Strawberry, and I use Perl PAckage Manager to install modules, insted of Cpan command. I know how to install them, but I need instrucions how to use them, step by step, how-to run the modules. Each module is used differently. Almost all modules can be included in your program with the statement (usually near the beginning of your program): use Module; where you substitute the name of the module you are going to use for Module. This statement imports the module's program statements into your program. This happens at compile time, no matter where in your program you actually put the 'use' statement. You can also import modules using 'do' or 'require', but you need to know what those do and why to use them before you use them instead of 'use'. Modules come in two flavors: procedural and object-oriented. Some modules support both flavors. Most modules come with built-in documentation that describes how to use them, usually including some sample code statements. To access the documentation, you can do the following on a command-line: perldoc Module Strawberry Perl may afford another way of accessing documentation. Procedural modules will import functions into your namespace, so you can just call these functions as if they were part of built-in Perl or part of your own program. Object-oriented modules allow you to create objects of the module class, and call methods of those objects. To create an object instance of the Module class: my $object = Module-new(); The new() method is a convention. It could be called anything, but most OO modules use a new() method for object creation, Some new() methods take arguments. To call a method on the object: $object-method(); See the documentation for each module to find out what functions and methods are available. There are Perl tutorials for using modules and doing object-oriented programming: perldoc perlmod perldoc perlmodlib perldoc perlmodstyle perldoc perlmodinstall perldoc perlboot perldoc perltoot perldoc perltooc Good luck! -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: modules
On Tue, Jun 04, 2013 at 12:01:09AM +0100, Rahim Fakir wrote: Iam using win 7 64bits, and i downloaded Strawberry, and I use Perl PAckage Manager to install modules, insted of Cpan command. I know how to install them, but I need instrucions how to use them, step by step, how-to run the modules. Best regards Ray Hi Ray, So, I assume you downloaded whatever modules you chose to because you wanted the whatever functionality they provide. Since I don't know _what_ modules you chose I'll give an imaginary example and then a specific example from a favorite module I use. Having said that: The CPAN page for a module always includes a SYNOPSIS - this gives a very terse example of using the module. Check there. For our example I'll use the fictional raspberry.pm. It's synopsis reads; use raspberry; my $answer = raspberry(); The description says: raspberry returns a line from the raspberry wisdom list. In your code then it might be used: #!/usr/bin/perl use warnings; use strict; use raspberry; # the use line incorporates the module code into your program my $answer = raspberry(); # the function call uses code from the module that you didn't write print $answer, $/; and the output might be something like Raspberries are delicious! Eat some soon to feel good! Now for a specific, real world example: #!/usr/bin/perl use Data::Dumper; [ imagine a bunch of code that does something, but you don't quite know what] [ someone else wrote it, and it's now time for you to fix a problem ] [ there's a huge complex data structure that hash of arrays or a hash of hashes or ...? ] print Dumper( \%my_hash_with_who_knows_what ): Because you're using Data::Dumper you didn't have to write a bunch of code to figure out how to interpret Perl data structures, Gurusamy Sarathy did all the hard work. All you need to do is include is module and call it on the hash of convoluted origins to see what it really is. Generically: use module_name; # code that calls on the modules functions or OO interfaces as documented. -- Michael Rasmussen, Portland Oregon Be Appropriate Follow Your Curiosity Other Adventures: http://www.jamhome.us/ or http://gplus.to/MichaelRpdx A special random fortune cookie fortune: A sadist is a masochist who follows the Golden Rule. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Adding perl modules, custom built .pm files
How do I add existing custom built perl modules that were built on a different system to another one, I have copied over the .pm file. Thanks in advance.
Re: Adding perl modules, custom built .pm files
Hi Dariusz, On Thu, 9 May 2013 10:08:38 -0500 Dariusz Dolecki dariusz.dole...@gmail.com wrote: How do I add existing custom built perl modules that were built on a different system to another one, I have copied over the .pm file. Put them in the @INC : [ IRC ] rindolf perlbot: @INC perlbot rindolf: To change @INC (perldoc perlvar), 'use lib' (perldoc lib), or use the -I option to perl (perldoc perlrun), or set the PERLLIB or PERL5LIB environment variables (perldoc perlrun), or recompile perl. See also local::lib for making setting @INC easier. [ END IRC ] Note that it is a good idea to package code as CPAN-like distributions (Foo-Bar-1.23.tar.gz): * http://perl-begin.org/topics/cpan/ (a link on a site that I maintain). * http://perl-begin.org/topics/modules-and-packages/ (another link from there). * http://perl101.org/ (not my site). Regards, Shlomi Fish -- - Shlomi Fish http://www.shlomifish.org/ List of Text Processing Tools - http://shlom.in/text-proc Major Kira: Well, duh! The prophets spoke of several of The Invisible’s children and their whereabouts. Jadzia: Major, you and I will need to talk someday about that “duh”. — http://www.shlomifish.org/humour/Star-Trek/We-the-Living-Dead/ Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Need clarification in using return value for modules
Greetings, I am using the following module [module] package My::GoldenRock::Utilities; use strict; use warnings; use base 'Exporter'; our @EXPORT_OK = qw(foo bar); our %EXPORT_TAGS = (all = \@EXPORT_OK); our $VERSION = 0.1; sub foo() { print Inside foo\n; } sub bar { print Inside bar\n; } [/module] #Please note that I am not using a return value (1 in this case) as the last statement [code] use My::GoldenRock::Utilities 'bar'; print bar(); [/code] [output] Inside bar 1 [/output] From where is the number 1 coming in the output. Earlier I mentioned '1' as the last statement in the module and I thought '1' is printed in the output owing to that. How to eliminate '1' from the output? Please explain the intricacies of use base 'Exporter'; our @EXPORT_OK = qw(foo bar); our %EXPORT_TAGS = (all = \@EXPORT_OK); Any pointers are greatly appreciated. best, Shaji --- Your talent is God's gift to you. What you do with it is your gift back to God. ---
Re: Need clarification in using return value for modules
On 03/28/2013 11:17 AM, *Shaji Kalidasan* wrote: Greetings, I am using the following module [module] package My::GoldenRock::Utilities; use strict; use warnings; use base 'Exporter'; our @EXPORT_OK = qw(foo bar); our %EXPORT_TAGS = (all = \@EXPORT_OK); our $VERSION = 0.1; sub foo() { print Inside foo\n; } sub bar { print Inside bar\n; } [/module] #Please note that I am not using a return value (1 in this case) as the last statement [code] use My::GoldenRock::Utilities 'bar'; print bar(); [/code] [output] Inside bar 1 [/output] From where is the number 1 coming in the output. Earlier I mentioned '1' as the last statement in the module and I thought '1' is printed in the output owing to that. How to eliminate '1' from the output? Please explain the intricacies of use base 'Exporter'; our @EXPORT_OK = qw(foo bar); our %EXPORT_TAGS = (all = \@EXPORT_OK); Any pointers are greatly appreciated. best, Shaji --- Your talent is God's gift to you. What you do with it is your gift back to God. --- Your subroutine bar() has a print statement in it, that prints Inside bar and a newline. bar() then returns the value of the last statement (which is the print in this case). The print function returns true when it succeeds, so it returns a 1 in this case. Your mainline code then prints (with another print) the return value of My::GoldenRock::Utilities::bar(). This is where you printed '1' comes from. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Need clarification in using return value for modules
Greetings, Thanks Nathan for your inputs and explanations. It is greatly appreciated. best, Shaji --- Your talent is God's gift to you. What you do with it is your gift back to God. --- From: Nathan Hilterbrand noset...@cotse.net To: beginners@perl.org Sent: Thursday, 28 March 2013 8:54 PM Subject: Re: Need clarification in using return value for modules On 03/28/2013 11:17 AM, *Shaji Kalidasan* wrote: Greetings, I am using the following module [module] package My::GoldenRock::Utilities; use strict; use warnings; use base 'Exporter'; our @EXPORT_OK = qw(foo bar); our %EXPORT_TAGS = (all = \@EXPORT_OK); our $VERSION = 0.1; sub foo() { print Inside foo\n; } sub bar { print Inside bar\n; } [/module] #Please note that I am not using a return value (1 in this case) as the last statement [code] use My::GoldenRock::Utilities 'bar'; print bar(); [/code] [output] Inside bar 1 [/output] From where is the number 1 coming in the output. Earlier I mentioned '1' as the last statement in the module and I thought '1' is printed in the output owing to that. How to eliminate '1' from the output? Please explain the intricacies of use base 'Exporter'; our @EXPORT_OK = qw(foo bar); our %EXPORT_TAGS = (all = \@EXPORT_OK); Any pointers are greatly appreciated. best, Shaji --- Your talent is God's gift to you. What you do with it is your gift back to God. --- Your subroutine bar() has a print statement in it, that prints Inside bar and a newline. bar() then returns the value of the last statement (which is the print in this case). The print function returns true when it succeeds, so it returns a 1 in this case. Your mainline code then prints (with another print) the return value of My::GoldenRock::Utilities::bar(). This is where you printed '1' comes from. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Where can I find the list of modules distributed by perl core?
On 2013-02-18 08:13, chenlin rao wrote: Or how can I know whether one module like YAML is such a core module? I need to write some perl scripts used for hadoop map/reduce streaming, so I donot want to use extra modules exists in my own computer. Nothing ever stops me from adding code to a datanode. -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Where can I find the list of modules distributed by perl core?
Or how can I know whether one module like YAML is such a core module? I need to write some perl scripts used for hadoop map/reduce streaming, so I donot want to use extra modules exists in my own computer.
Re: Where can I find the list of modules distributed by perl core?
From: chenlin rao rao.chen...@gmail.com To: beginners@perl.org Sent: Monday, 18 February 2013 12:43 PM Subject: Where can I find the list of modules distributed by perl core? Or how can I know whether one module like YAML is such a core module? I need to write some perl scripts used for hadoop map/reduce streaming, so I donot want to use extra modules exists in my own computer. Hi Chenlin, You can use corelist to find out if it is part of standard distribution or not. corelist XML::DOM XML::DOM was not in CORE (or so I think) corelist IO::File IO::File was first released with perl 5.00307 corelist strict strict was first released with perl 5 best, Shaji --- Your talent is God's gift to you. What you do with it is your gift back to God. --- -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
confusion about modules for email
Hello, I want to use an email module on my webserver, which is NOT running any mail server. I am not sure if I have install and configure a mail server first??? how does following modules work? they need a mail server running in the back? Mail::Sendmail Email::Sender pl advice from your experience. ty. Rajeev
Package modules and EXPORTER use
I've got an odd situation here and I'm not sure what to think about it. I've had to pull several subroutines into it's own package since they all have similar functions (as far as that goes) and I find that I reuse them more than I thought. My question stems from the EXPORTER directive. I've got one package that does NOT include an EXPORTER nor exports any subroutines, yet it's used by virtually all other parts of the system. I've never really noticed it before, which is why now it's so curious. I can't find anywhere that EXPORTER is optional, but also can't find anything special about the content or syntax, etc about the package that doesn't use it. So, should I use it? Does it really matter in small apps? What am I missing here? -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux 3.4.6-1.fc16.x86_64 GNU/Linux -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Package modules and EXPORTER use
Hi Mark, let me try to tackle your questions incrementally. On Thu, 02 Aug 2012 09:17:00 -0400 Mark Haney ma...@abemblem.com wrote: I've got an odd situation here and I'm not sure what to think about it. I've had to pull several subroutines into it's own package since they all have similar functions (as far as that goes) and I find that I reuse them more than I thought. Did you put them into their own package or also into their own module? I hope you know there's a difference. Do the module and package share the same name. My question stems from the EXPORTER directive. I've got one package that does NOT include an EXPORTER nor exports any subroutines, yet it's used by virtually all other parts of the system. I've never really noticed it before, which is why now it's so curious. By EXPORTER you probably mean «use parent 'Exporter';» (or use base 'Exporter') along with the special variable of @EXPORT, @EXPORT_OK, etc. In any case, is it a module that does not have a package specifier (in which case it will dump its contents into the current package). Maybe it does have a package specifier, but names from it are called using MyPackage::my_sub() (i.e: fully-qualified names). I can't find anywhere that EXPORTER is optional, but also can't find anything special about the content or syntax, etc about the package that doesn't use it. Use of Exporter.pm (or Sub::Exporter for that matter) is optional, and you may opt to avoid them if you're creating an object-oriented interface. So, should I use it? Does it really matter in small apps? What am I missing here? Can you give a code sample that reproduces the issue? Regards, Shlomi Fish -- - Shlomi Fish http://www.shlomifish.org/ Why I Love Perl - http://shlom.in/joy-of-perl Chuck Norris can make the statement “This statement is false.” a true one. Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Package modules and EXPORTER use
On 08/02/2012 09:57 AM, Shlomi Fish wrote: Hi Mark, So, should I use it? Does it really matter in small apps? What am I missing here? Can you give a code sample that reproduces the issue? Let me see if I can explain better. I have a Package called EMBMON::DAO which (as may be obvious) handles the object for accessing the database. This one does NOT have an EXPORT line yet nearly all the code in the web app uses the subroutines (about 2 dozen) in this package. I also have a package EMBMON::UTIL that houses various subroutines for things like calculating averages or other things specific to the app. There are only 6 subs in that package and it HAS an EXPORT line exporting the subs in the package. Vaguely, I knew there was a difference in modules and packages, but nothing I've ever had to write has really required modules and only one or two packages. Does this help? -- Mark Haney Software Developer/Consultant AB Emblem ma...@abemblem.com Linux marius.homelinux 3.4.6-1.fc16.x86_64 GNU/Linux -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Package modules and EXPORTER use
On 08/02/2012 09:51 AM, Mark Haney wrote: On 08/02/2012 09:57 AM, Shlomi Fish wrote: Hi Mark, So, should I use it? Does it really matter in small apps? What am I missing here? Can you give a code sample that reproduces the issue? Let me see if I can explain better. I have a Package called EMBMON::DAO which (as may be obvious) handles the object for accessing the database. This one does NOT have an EXPORT line yet nearly all the code in the web app uses the subroutines (about 2 dozen) in this package. So - there are subroutines that are being called in the package as subroutine calls e.g. my $answer = dosomething($some,@parameter); (As opposed to some methods being called in the class like my $dao_thing = EMBMON::DAO-new(%configuration); $dao_thing-do_something($some,@parameter); To do the first, your package would have to perform the same magic that Exporter would do - which would work the same. I'd recommend using Exporter because it provides a rich feature set that is known to work and is well documented. I also have a package EMBMON::UTIL that houses various subroutines for things like calculating averages or other things specific to the app. There are only 6 subs in that package and it HAS an EXPORT line exporting the subs in the package. Which is probably the better thing to do. As I age, I find myself importing names into my package namespace less and less often - I actually prefer to use the fully qualified subroutine names, because it makes it (in my opinion) easier to find the documentation for a specific function call. Of course, being a big old OO bigot - I prefer objects and their method calls to functions any day of the week and twice on Sundays. --L Vaguely, I knew there was a difference in modules and packages, but nothing I've ever had to write has really required modules and only one or two packages. Does this help? -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Package modules and EXPORTER use
On Aug 2, 2012, at 7:51 AM, Mark Haney wrote: On 08/02/2012 09:57 AM, Shlomi Fish wrote: Hi Mark, So, should I use it? Does it really matter in small apps? What am I missing here? Can you give a code sample that reproduces the issue? Let me see if I can explain better. I have a Package called EMBMON::DAO which (as may be obvious) handles the object for accessing the database. This one does NOT have an EXPORT line yet nearly all the code in the web app uses the subroutines (about 2 dozen) in this package. Can you give us an example of how your main program calls the subroutines in the EMBMON::DAO package? Are you calling them as simple functions (which need to be exported_) or as object methods (which do not)? I also have a package EMBMON::UTIL that houses various subroutines for things like calculating averages or other things specific to the app. There are only 6 subs in that package and it HAS an EXPORT line exporting the subs in the package. Vaguely, I knew there was a difference in modules and packages, but nothing I've ever had to write has really required modules and only one or two packages. Does this help? Including code samples always helps! -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Package modules and EXPORTER use
On Thu, 2 Aug 2012 08:34:48 -0700 Jim Gibson jimsgib...@gmail.com wrote: Including code samples always helps! Please copy paste your code if you're going to include it. Rewritten code almost always has bugs. -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. _Perl links_ official site : http://www.perl.org/ beginners' help : http://learn.perl.org/faq/beginners.html advance help: http://perlmonks.org/ documentation : http://perldoc.perl.org/ news: http://perlsphere.net/ repository : http://www.cpan.org/ blog: http://blogs.perl.org/ regional groups : http://www.pm.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
moving from ubuntu 10.04 to 12.04. how to have same PERL modules there?
Hello, I am going to move (not upgrade) from my current ubuntu ver 10.10 to ver. 12.04 (fresh install). I will restore my data and scripts there and have them ready. But, how do i have all the required modules (which i have installed on my current PC over months) installed on target system? I do not want to have old versions of software on new PC, buut i just want to make sure that all which was installed (in regard to PERL) on old PC should be on new PC as well. for e.g. on 10.10: perl ver is: v5.10 on 12.04 it is: perl (5.14.2-6ubuntu2) is there a quick method to do that? thank you. Rajeev
Re: moving from ubuntu 10.04 to 12.04. how to have same PERL modules there?
On 12-06-05 04:00 PM, Rajeev Prasad wrote: for e.g. on 10.10: perl ver is: v5.10 on 12.04 it is: perl (5.14.2-6ubuntu2) is there a quick method to do that? No, but you can adapt this algorithm: http://onionstand.blogspot.ca/2012/05/moving-modules-across-perlbrew.html Use this command to create the list of installed modules: $ perl -MExtUtils::Installed -E 'print $_\n for ExtUtils::Installed-new-modules' /tmp/installed.list Copy installed.list to the target system, install `cpanm` and then use this commnad to install them: $ cat /tmp/installed.list | cpanm --interactive -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. _Perl links_ official site : http://www.perl.org/ beginners' help : http://learn.perl.org/faq/beginners.html advance help: http://perlmonks.org/ documentation : http://perldoc.perl.org/ news: http://perlsphere.net/ repository : http://www.cpan.org/ blog: http://blogs.perl.org/ regional groups : http://www.pm.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: moving from ubuntu 10.04 to 12.04. how to have same PERL modules there?
thx Shawn, I guess, it would not check which modules have newer versions available, and will install the same modules whihc were there in old PC. I install only those modules which come thru ubuntu, so that (I assume) there is some compatibility testing already done. (anD) it does not break anythign else in my PERL install. I will try it on test system first. I found another simple way, which works for me (my scripts are simple ones): I would just go thru all my scripts and see what am I 'useing' like __ use abc::def __ and then make a list of those. then go on target system and open some tool like synaptic (for ubuntu) and install all those modules. :) I will try that too. ty. Rajeev From: Shawn H Corey shawnhco...@gmail.com To: beginners@perl.org Sent: Tuesday, June 5, 2012 3:29 PM Subject: Re: moving from ubuntu 10.04 to 12.04. how to have same PERL modules there? On 12-06-05 04:00 PM, Rajeev Prasad wrote: for e.g. on 10.10: perl ver is: v5.10 on 12.04 it is: perl (5.14.2-6ubuntu2) is there a quick method to do that? No, but you can adapt this algorithm: http://onionstand.blogspot.ca/2012/05/moving-modules-across-perlbrew.html Use this command to create the list of installed modules: $ perl -MExtUtils::Installed -E 'print $_\n for ExtUtils::Installed-new-modules' /tmp/installed.list Copy installed.list to the target system, install `cpanm` and then use this commnad to install them: $ cat /tmp/installed.list | cpanm --interactive -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. _Perl links_ official site : http://www.perl.org/ beginners' help : http://learn.perl.org/faq/beginners.html advance help : http://perlmonks.org/ documentation : http://perldoc.perl.org/ news : http://perlsphere.net/ repository : http://www.cpan.org/ blog : http://blogs.perl.org/ regional groups : http://www.pm.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: install modules from CPAN
I am not really sure what is going on here since I can get http://cpan.strawberryperl.com/authors/01mailrc.txt.gz without any problem from my computer. Can you try getting the file using your browser first? On Wed, Mar 14, 2012 at 10:48 PM, Bisiigwa Godfrey wbisii...@gmail.com wrote: Hi there, i have perl 5.6 on my laptop am i want to download some modules from CPAN but all attempts i have made have failed giving me such errors, some help. C:\perl -MCPAN -e shell cpan shell -- CPAN exploration and modules installation (v1.9600) Enter 'h' for help. cpan install DBD::mysql Fetching with LWP: http://cpan.strawberryperl.com/authors/01mailrc.txt.gz LWP failed with code[500] message[Can't connect to cpan.strawberryperl.com:80 (c onnect: timeout)] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01mailrc.txt .gz.tmp2760'. Giving up on it. Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01mailrc.txt .gz.tmp2760'. Giving up on it. As a last resort we now switch to the external ftp command 'C:\WINDOWS\system32\ ftp.EXE' ftp://ftp.exe'/ to get 'C:\strawberry\cpan\sources\authors\01mailrc.txt.gz.tmp2760'. Doing so often leads to problems that are hard to diagnose. If you're the victim of such problems, please consider unsetting the ftp config variable with o conf ftp o conf commit Fetching with LWP: http://cpan.strawberryperl.com/authors/01mailrc.txt.gz LWP failed with code[500] message[Can't connect to cpan.strawberryperl.com:80 (c onnect: timeout)] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01mailrc.txt .gz.tmp2760'. Giving up on it. Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01mailrc.txt .gz.tmp2760'. Giving up on it. As a last resort we now switch to the external ftp command 'C:\WINDOWS\system32\ ftp.EXE' ftp://ftp.exe'/ to get 'C:\strawberry\cpan\sources\authors\01mailrc.txt.gz.tmp2760'. Doing so often leads to problems that are hard to diagnose. If you're the victim of such problems, please consider unsetting the ftp config variable with o conf ftp o conf commit Please check, if the URLs I found in your configuration file (http://cpan.strawberryperl.com/) are valid. The urllist can be edited. E.g. with 'o conf urllist push ftp://myurl/' Could not fetch authors/01mailrc.txt.gz Fetching with LWP: http://cpan.strawberryperl.com/authors/01mailrc.txt.gz LWP failed with code[500] message[Can't connect to cpan.strawberryperl.com:80 (c onnect: timeout)] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01mailrc.txt .gz.tmp2760'. Giving up on it. Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01mailrc.txt .gz.tmp2760'. Giving up on it. As a last resort we now switch to the external ftp command 'C:\WINDOWS\system32\ ftp.EXE' ftp://ftp.exe'/ to get 'C:\strawberry\cpan\sources\authors\01mailrc.txt.gz.tmp2760'. Doing so often leads to problems that are hard to diagnose. If you're the victim of such problems, please consider unsetting the ftp config variable with o conf ftp o conf commit Fetching with LWP: http://cpan.strawberryperl.com/authors/01mailrc.txt.gz -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: install modules from CPAN
From the following line: LWP failed with code[500] message[Can't connect to cpan.strawberryperl.com:80 http://cpan.strawberryperl.com/ (connect: timeout)] it looks like LWP is unable to connect to the site to download the modules. You need to make sure your connected to the internet. Also, if you are, check your firewall and ensure your not blocking access to the application. Regards, Jeff On Thu, Mar 15, 2012 at 2:05 AM, Leo Susanto leosusa...@gmail.com wrote: I am not really sure what is going on here since I can get http://cpan.strawberryperl.com/authors/01mailrc.txt.gz without any problem from my computer. Can you try getting the file using your browser first? On Wed, Mar 14, 2012 at 10:48 PM, Bisiigwa Godfrey wbisii...@gmail.com wrote: Hi there, i have perl 5.6 on my laptop am i want to download some modules from CPAN but all attempts i have made have failed giving me such errors, some help. C:\perl -MCPAN -e shell cpan shell -- CPAN exploration and modules installation (v1.9600) Enter 'h' for help. cpan install DBD::mysql Fetching with LWP: http://cpan.strawberryperl.com/authors/01mailrc.txt.gz LWP failed with code[500] message[Can't connect to cpan.strawberryperl.com:80 (c onnect: timeout)] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01mailrc.txt .gz.tmp2760'. Giving up on it. Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01mailrc.txt .gz.tmp2760'. Giving up on it. As a last resort we now switch to the external ftp command 'C:\WINDOWS\system32\ ftp.EXE' ftp://ftp.exe'/ to get 'C:\strawberry\cpan\sources\authors\01mailrc.txt.gz.tmp2760'. Doing so often leads to problems that are hard to diagnose. If you're the victim of such problems, please consider unsetting the ftp config variable with o conf ftp o conf commit Fetching with LWP: http://cpan.strawberryperl.com/authors/01mailrc.txt.gz LWP failed with code[500] message[Can't connect to cpan.strawberryperl.com:80 (c onnect: timeout)] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01mailrc.txt .gz.tmp2760'. Giving up on it. Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01mailrc.txt .gz.tmp2760'. Giving up on it. As a last resort we now switch to the external ftp command 'C:\WINDOWS\system32\ ftp.EXE' ftp://ftp.exe'/ to get 'C:\strawberry\cpan\sources\authors\01mailrc.txt.gz.tmp2760'. Doing so often leads to problems that are hard to diagnose. If you're the victim of such problems, please consider unsetting the ftp config variable with o conf ftp o conf commit Please check, if the URLs I found in your configuration file (http://cpan.strawberryperl.com/) are valid. The urllist can be edited. E.g. with 'o conf urllist push ftp://myurl/' Could not fetch authors/01mailrc.txt.gz Fetching with LWP: http://cpan.strawberryperl.com/authors/01mailrc.txt.gz LWP failed with code[500] message[Can't connect to cpan.strawberryperl.com:80 (c onnect: timeout)] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01mailrc.txt .gz.tmp2760'. Giving up on it. Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01mailrc.txt .gz.tmp2760'. Giving up on it. As a last resort we now switch to the external ftp command 'C:\WINDOWS\system32\ ftp.EXE' ftp://ftp.exe'/ to get 'C:\strawberry\cpan\sources\authors\01mailrc.txt.gz.tmp2760'. Doing so often leads to problems that are hard to diagnose. If you're the victim of such problems, please consider unsetting the ftp config variable with o conf ftp o conf commit Fetching with LWP: http://cpan.strawberryperl.com/authors/01mailrc.txt.gz -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: install modules from CPAN
Thanks, I was doing it under strictness of the office web firewall, let me try again when am out of the office proxy way On Thu, Mar 15, 2012 at 9:45 AM, Jefferson Kirkland numberw...@gmail.comwrote: From the following line: LWP failed with code[500] message[Can't connect to cpan.strawberryperl.com:80 http://cpan.strawberryperl.com/ http://cpan.strawberryperl.com/ (connect: timeout)] it looks like LWP is unable to connect to the site to download the modules. You need to make sure your connected to the internet. Also, if you are, check your firewall and ensure your not blocking access to the application. Regards, Jeff On Thu, Mar 15, 2012 at 2:05 AM, Leo Susanto leosusa...@gmail.com wrote: I am not really sure what is going on here since I can get http://cpan.strawberryperl.com/authors/01mailrc.txt.gz without any problem from my computer. Can you try getting the file using your browser first? On Wed, Mar 14, 2012 at 10:48 PM, Bisiigwa Godfrey wbisii...@gmail.com wrote: Hi there, i have perl 5.6 on my laptop am i want to download some modules from CPAN but all attempts i have made have failed giving me such errors, some help. C:\perl -MCPAN -e shell cpan shell -- CPAN exploration and modules installation (v1.9600) Enter 'h' for help. cpan install DBD::mysql Fetching with LWP: http://cpan.strawberryperl.com/authors/01mailrc.txt.gz LWP failed with code[500] message[Can't connect to cpan.strawberryperl.com:80 http://cpan.strawberryperl.com/ (c onnect: timeout)] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01mailrc.txt .gz.tmp2760'. Giving up on it. Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01mailrc.txt .gz.tmp2760'. Giving up on it. As a last resort we now switch to the external ftp command 'C:\WINDOWS\system32\ ftp.EXE' ftp://ftp.exe'/ to get 'C:\strawberry\cpan\sources\authors\01mailrc.txt.gz.tmp2760'. Doing so often leads to problems that are hard to diagnose. If you're the victim of such problems, please consider unsetting the ftp config variable with o conf ftp o conf commit Fetching with LWP: http://cpan.strawberryperl.com/authors/01mailrc.txt.gz LWP failed with code[500] message[Can't connect to cpan.strawberryperl.com:80 http://cpan.strawberryperl.com/ (c onnect: timeout)] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01mailrc.txt .gz.tmp2760'. Giving up on it. Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01mailrc.txt .gz.tmp2760'. Giving up on it. As a last resort we now switch to the external ftp command 'C:\WINDOWS\system32\ ftp.EXE' ftp://ftp.exe'/ to get 'C:\strawberry\cpan\sources\authors\01mailrc.txt.gz.tmp2760'. Doing so often leads to problems that are hard to diagnose. If you're the victim of such problems, please consider unsetting the ftp config variable with o conf ftp o conf commit Please check, if the URLs I found in your configuration file (http://cpan.strawberryperl.com/) are valid. The urllist can be edited. E.g. with 'o conf urllist push ftp://myurl/' Could not fetch authors/01mailrc.txt.gz Fetching with LWP: http://cpan.strawberryperl.com/authors/01mailrc.txt.gz LWP failed with code[500] message[Can't connect to cpan.strawberryperl.com:80 http://cpan.strawberryperl.com/ (c onnect: timeout)] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01mailrc.txt .gz.tmp2760'. Giving up on it. Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01mailrc.txt .gz.tmp2760'. Giving up on it. As a last resort we now switch to the external ftp command 'C:\WINDOWS\system32\ ftp.EXE' ftp://ftp.exe'/ to get 'C:\strawberry\cpan\sources\authors\01mailrc.txt.gz.tmp2760'. Doing so often leads to problems that are hard to diagnose. If you're the victim of such problems, please consider unsetting the ftp config variable with o conf ftp o conf commit Fetching with LWP: http://cpan.strawberryperl.com/authors/01mailrc.txt.gz -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
install modules from CPAN
Hi there, i have perl 5.6 on my laptop am i want to download some modules from CPAN but all attempts i have made have failed giving me such errors, some help. C:\perl -MCPAN -e shell cpan shell -- CPAN exploration and modules installation (v1.9600) Enter 'h' for help. cpan install DBD::mysql Fetching with LWP: http://cpan.strawberryperl.com/authors/01mailrc.txt.gz LWP failed with code[500] message[Can't connect to cpan.strawberryperl.com:80 (c onnect: timeout)] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01mailrc.txt .gz.tmp2760'. Giving up on it. Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01mailrc.txt .gz.tmp2760'. Giving up on it. As a last resort we now switch to the external ftp command 'C:\WINDOWS\system32\ ftp.EXE' ftp://ftp.exe'/ to get 'C:\strawberry\cpan\sources\authors\01mailrc.txt.gz.tmp2760'. Doing so often leads to problems that are hard to diagnose. If you're the victim of such problems, please consider unsetting the ftp config variable with o conf ftp o conf commit Fetching with LWP: http://cpan.strawberryperl.com/authors/01mailrc.txt.gz LWP failed with code[500] message[Can't connect to cpan.strawberryperl.com:80 (c onnect: timeout)] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01mailrc.txt .gz.tmp2760'. Giving up on it. Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01mailrc.txt .gz.tmp2760'. Giving up on it. As a last resort we now switch to the external ftp command 'C:\WINDOWS\system32\ ftp.EXE' ftp://ftp.exe'/ to get 'C:\strawberry\cpan\sources\authors\01mailrc.txt.gz.tmp2760'. Doing so often leads to problems that are hard to diagnose. If you're the victim of such problems, please consider unsetting the ftp config variable with o conf ftp o conf commit Please check, if the URLs I found in your configuration file (http://cpan.strawberryperl.com/) are valid. The urllist can be edited. E.g. with 'o conf urllist push ftp://myurl/' Could not fetch authors/01mailrc.txt.gz Fetching with LWP: http://cpan.strawberryperl.com/authors/01mailrc.txt.gz LWP failed with code[500] message[Can't connect to cpan.strawberryperl.com:80 (c onnect: timeout)] Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01mailrc.txt .gz.tmp2760'. Giving up on it. Warning: no success downloading 'C:\strawberry\cpan\sources\authors\01mailrc.txt .gz.tmp2760'. Giving up on it. As a last resort we now switch to the external ftp command 'C:\WINDOWS\system32\ ftp.EXE' ftp://ftp.exe'/ to get 'C:\strawberry\cpan\sources\authors\01mailrc.txt.gz.tmp2760'. Doing so often leads to problems that are hard to diagnose. If you're the victim of such problems, please consider unsetting the ftp config variable with o conf ftp o conf commit Fetching with LWP: http://cpan.strawberryperl.com/authors/01mailrc.txt.gz
some intelligent website/modules
Hi, are there some intelligent modules or website, I send it a string, it can intelligently analysis the structures and gave me several options consisted of those regular expressions, Just curious, Thanks with best regards, -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: some intelligent website/modules
On 12-02-18 08:40 AM, lina wrote: Hi, are there some intelligent modules or website, I send it a string, it can intelligently analysis the structures and gave me several options consisted of those regular expressions, Just curious, Thanks with best regards, Try: http://txt2re.com/index.php3 -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. It's Mutual Aid, not fierce competition, that's the dominate force of evolution. Of course, anyone who has worked in open source already knows this. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: some intelligent website/modules
On 18 Feb, 2012, at 22:55, Shawn H Corey shawnhco...@gmail.com wrote: On 12-02-18 08:40 AM, lina wrote: Hi, are there some intelligent modules or website, I send it a string, it can intelligently analysis the structures and gave me several options consisted of those regular expressions, Just curious, Thanks with best regards, Try: http://txt2re.com/index.php3 Thanks for sharing. Amazingly there is a real such thing. Cool. Best regards, -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. It's Mutual Aid, not fierce competition, that's the dominate force of evolution. Of course, anyone who has worked in open source already knows this. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
RE: How to compile just the current perl module, ignoring all the other included modules
Hi Shawn How do I use this option of -MO=Deparse when executing a perl script with an embedded #! Prompt? Our scripts start with the line #!/ats/bin/perl -w I tried adding the parameters here, but got the following errors Too late for -MO=Deparse option at ./startAutomation line 1. BEGIN { $^W = 1; } Then there are a host of other environment variables set before executing the functions in the modules by a call to unless ( my $return_val = do $test_suite_list_file ) { die ERROR: Couldn't parse test suite file \$test_suite_list_file\: $@\n if $@; die ERROR: Couldn't 'do' test suite file \$test_suite_list_file\: $!\n unless defined $return_val; die ERROR: Couldn't run test suite file \$test_suite_list_file\: $!\n unless $return_val; is there other way of using the option -MO=Deparse?? Thanks, Satya -Original Message- From: Shawn H Corey [mailto:shawnhco...@gmail.com] Sent: 23 January 2012 18:25 To: beginners@perl.org Subject: Re: How to compile just the current perl module, ignoring all the other included modules On 12-01-23 12:38 PM, Nemana, Satya wrote: I tried perl -c also with the same results. It takes 4-5 minutes to know that I missed a some where. It is very painful. Is there no other way? That's very unusual, most scripts take only a few seconds to compile. Try: perl -MO=Deparse MyModule.pm -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. Strength is not a measure of the body. It's a measure of the heart. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: How to compile just the current perl module, ignoring all the other included modules
On 27/01/2012 12:58, Nemana, Satya wrote: Hi Shawn How do I use this option of -MO=Deparse when executing a perl script with an embedded #! Prompt? Our scripts start with the line #!/ats/bin/perl -w I tried adding the parameters here, but got the following errors Too late for -MO=Deparse option at ./startAutomation line 1. BEGIN { $^W = 1; } Then there are a host of other environment variables set before executing the functions in the modules by a call to unless ( my $return_val = do $test_suite_list_file ) { die ERROR: Couldn't parse test suite file \$test_suite_list_file\: $@\n if $@; die ERROR: Couldn't 'do' test suite file \$test_suite_list_file\: $!\n unless defined $return_val; die ERROR: Couldn't run test suite file \$test_suite_list_file\: $!\n unless $return_val; is there other way of using the option -MO=Deparse?? No, the module has to be mentioned on the comnmand line, but you can say /ats/bin/perl -w -MO=Deparse prog.pl which will have the desired effect. You can also add the additional files in the same command if necessary using the -f option like this /ats/bin/perl -w -MO=Deparse -f file1.pl -f file2.pl prog.pl Also you should be using use warnings; instead of -w in the #! line. HTH, Rob -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
RE: How to compile just the current perl module, ignoring all the other included modules
Hi Rob All I got from this exercise is ./startAutomation syntax OK and a complete print of the startAutomation perl file with the fully qualified function names, all the variables used in the program at the beginning of the program. From the time command output, as used in the command time /ats/bin/perl -w -MO=Deparse ./startAutomation I have 92.765u 110.414s 3:24.11 99.5% 0+0k 0+0io 0pf+0w How do I know module wise, how much time perl is taking for compiling each of the modules and where perl is spending time in the compilation? How do I enable more verbose in the compilation or execution of the program? Thanks, Satya -Original Message- From: Rob Dixon [mailto:rob.di...@gmx.com] Sent: 27 January 2012 15:19 To: beginners@perl.org Cc: Nemana, Satya Subject: Re: How to compile just the current perl module, ignoring all the other included modules On 27/01/2012 12:58, Nemana, Satya wrote: Hi Shawn How do I use this option of -MO=Deparse when executing a perl script with an embedded #! Prompt? Our scripts start with the line #!/ats/bin/perl -w I tried adding the parameters here, but got the following errors Too late for -MO=Deparse option at ./startAutomation line 1. BEGIN { $^W = 1; } Then there are a host of other environment variables set before executing the functions in the modules by a call to unless ( my $return_val = do $test_suite_list_file ) { die ERROR: Couldn't parse test suite file \$test_suite_list_file\: $@\n if $@; die ERROR: Couldn't 'do' test suite file \$test_suite_list_file\: $!\n unless defined $return_val; die ERROR: Couldn't run test suite file \$test_suite_list_file\: $!\n unless $return_val; is there other way of using the option -MO=Deparse?? No, the module has to be mentioned on the comnmand line, but you can say /ats/bin/perl -w -MO=Deparse prog.pl which will have the desired effect. You can also add the additional files in the same command if necessary using the -f option like this /ats/bin/perl -w -MO=Deparse -f file1.pl -f file2.pl prog.pl Also you should be using use warnings; instead of -w in the #! line. HTH, Rob
Re: How to compile just the current perl module, ignoring all the other included modules
Hi Satya, On Fri, Jan 27, 2012 at 5:29 PM, Nemana, Satya snem...@sonusnet.com wrote: Hi Rob All I got from this exercise is ./startAutomation syntax OK and a complete print of the startAutomation perl file with the fully qualified function names, all the variables used in the program at the beginning of the program. From the time command output, as used in the command time /ats/bin/perl -w -MO=Deparse ./startAutomation I have 92.765u 110.414s 3:24.11 99.5% 0+0k 0+0io 0pf+0w How do I know module wise, how much time perl is taking for compiling each of the modules and where perl is spending time in the compilation? I think the module you need is Benchmark. Please do on CLI: perldoc Benchmark. Am sure you get want to want! How do I enable more verbose in the compilation or execution of the program? Thanks, Satya -Original Message- From: Rob Dixon [mailto:rob.di...@gmx.com] Sent: 27 January 2012 15:19 To: beginners@perl.org Cc: Nemana, Satya Subject: Re: How to compile just the current perl module, ignoring all the other included modules On 27/01/2012 12:58, Nemana, Satya wrote: Hi Shawn How do I use this option of -MO=Deparse when executing a perl script with an embedded #! Prompt? Our scripts start with the line #!/ats/bin/perl -w I tried adding the parameters here, but got the following errors Too late for -MO=Deparse option at ./startAutomation line 1. BEGIN { $^W = 1; } Then there are a host of other environment variables set before executing the functions in the modules by a call to unless ( my $return_val = do $test_suite_list_file ) { die ERROR: Couldn't parse test suite file \$test_suite_list_file\: $@\n if $@; die ERROR: Couldn't 'do' test suite file \$test_suite_list_file\: $!\n unless defined $return_val; die ERROR: Couldn't run test suite file \$test_suite_list_file\: $!\n unless $return_val; is there other way of using the option -MO=Deparse?? No, the module has to be mentioned on the comnmand line, but you can say /ats/bin/perl -w -MO=Deparse prog.pl which will have the desired effect. You can also add the additional files in the same command if necessary using the -f option like this /ats/bin/perl -w -MO=Deparse -f file1.pl -f file2.pl prog.pl Also you should be using use warnings; instead of -w in the #! line. HTH, Rob -- Tim
Re: How to compile just the current perl module, ignoring all the other included modules
what you want I mean! thanks On Fri, Jan 27, 2012 at 5:45 PM, timothy adigun 2teezp...@gmail.com wrote: Hi Satya, On Fri, Jan 27, 2012 at 5:29 PM, Nemana, Satya snem...@sonusnet.comwrote: Hi Rob All I got from this exercise is ./startAutomation syntax OK and a complete print of the startAutomation perl file with the fully qualified function names, all the variables used in the program at the beginning of the program. From the time command output, as used in the command time /ats/bin/perl -w -MO=Deparse ./startAutomation I have 92.765u 110.414s 3:24.11 99.5% 0+0k 0+0io 0pf+0w How do I know module wise, how much time perl is taking for compiling each of the modules and where perl is spending time in the compilation? I think the module you need is Benchmark. Please do on CLI: perldoc Benchmark. Am sure you get want to want! How do I enable more verbose in the compilation or execution of the program? Thanks, Satya -Original Message- From: Rob Dixon [mailto:rob.di...@gmx.com] Sent: 27 January 2012 15:19 To: beginners@perl.org Cc: Nemana, Satya Subject: Re: How to compile just the current perl module, ignoring all the other included modules On 27/01/2012 12:58, Nemana, Satya wrote: Hi Shawn How do I use this option of -MO=Deparse when executing a perl script with an embedded #! Prompt? Our scripts start with the line #!/ats/bin/perl -w I tried adding the parameters here, but got the following errors Too late for -MO=Deparse option at ./startAutomation line 1. BEGIN { $^W = 1; } Then there are a host of other environment variables set before executing the functions in the modules by a call to unless ( my $return_val = do $test_suite_list_file ) { die ERROR: Couldn't parse test suite file \$test_suite_list_file\: $@\n if $@; die ERROR: Couldn't 'do' test suite file \$test_suite_list_file\: $!\n unless defined $return_val; die ERROR: Couldn't run test suite file \$test_suite_list_file\: $!\n unless $return_val; is there other way of using the option -MO=Deparse?? No, the module has to be mentioned on the comnmand line, but you can say /ats/bin/perl -w -MO=Deparse prog.pl which will have the desired effect. You can also add the additional files in the same command if necessary using the -f option like this /ats/bin/perl -w -MO=Deparse -f file1.pl -f file2.pl prog.pl Also you should be using use warnings; instead of -w in the #! line. HTH, Rob -- Tim -- Tim
RE: How to compile just the current perl module, ignoring all the other included modules
Hi Timothy Thank you,(sounds like a silver bullet J ) will give it a try and post the results. Regards, Satya From: timothy adigun [mailto:2teezp...@gmail.com] Sent: 27 January 2012 16:46 To: Nemana, Satya Cc: Rob Dixon; beginners@perl.org Subject: Re: How to compile just the current perl module, ignoring all the other included modules what you want I mean! thanks On Fri, Jan 27, 2012 at 5:45 PM, timothy adigun 2teezp...@gmail.com wrote: Hi Satya, On Fri, Jan 27, 2012 at 5:29 PM, Nemana, Satya snem...@sonusnet.com wrote: Hi Rob All I got from this exercise is ./startAutomation syntax OK and a complete print of the startAutomation perl file with the fully qualified function names, all the variables used in the program at the beginning of the program. From the time command output, as used in the command time /ats/bin/perl -w -MO=Deparse ./startAutomation I have 92.765u 110.414s 3:24.11 99.5% 0+0k 0+0io 0pf+0w How do I know module wise, how much time perl is taking for compiling each of the modules and where perl is spending time in the compilation? I think the module you need is Benchmark. Please do on CLI: perldoc Benchmark. Am sure you get want to want! How do I enable more verbose in the compilation or execution of the program? Thanks, Satya -Original Message- From: Rob Dixon [mailto:rob.di...@gmx.com] Sent: 27 January 2012 15:19 To: beginners@perl.org Cc: Nemana, Satya Subject: Re: How to compile just the current perl module, ignoring all the other included modules On 27/01/2012 12:58, Nemana, Satya wrote: Hi Shawn How do I use this option of -MO=Deparse when executing a perl script with an embedded #! Prompt? Our scripts start with the line #!/ats/bin/perl -w I tried adding the parameters here, but got the following errors Too late for -MO=Deparse option at ./startAutomation line 1. BEGIN { $^W = 1; } Then there are a host of other environment variables set before executing the functions in the modules by a call to unless ( my $return_val = do $test_suite_list_file ) { die ERROR: Couldn't parse test suite file \$test_suite_list_file\: $@\n if $@; die ERROR: Couldn't 'do' test suite file \$test_suite_list_file\: $!\n unless defined $return_val; die ERROR: Couldn't run test suite file \$test_suite_list_file\: $!\n unless $return_val; is there other way of using the option -MO=Deparse?? No, the module has to be mentioned on the comnmand line, but you can say /ats/bin/perl -w -MO=Deparse prog.pl which will have the desired effect. You can also add the additional files in the same command if necessary using the -f option like this /ats/bin/perl -w -MO=Deparse -f file1.pl -f file2.pl prog.pl Also you should be using use warnings; instead of -w in the #! line. HTH, Rob -- Tim -- Tim
Re: How to compile just the current perl module, ignoring all the other included modules
On Mon, 23 Jan 2012 12:38:44 -0500, Nemana, Satya wrote: I tried perl -c also with the same results. It takes 4-5 minutes to know that I missed a some where. It is very painful. 4-5 minutes?! Either you have an unbearably slow computer or something is not right. Please post details. It sounds like some module is doing ridiculous computations in its main code instead of being encapsulated in subroutines. It should be tracked down and shot^Wrefactored. That's likely to cause all kinds of problems, so working around it like you're trying isn't really the answer. -- Peter Scott http://www.perlmedic.com/ http://www.perldebugged.com/ http://www.informit.com/store/product.aspx?isbn=0137001274 http://www.oreillyschool.com/certificates/perl-programming.php -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: How to compile just the current perl module, ignoring all theother included modules
On 2012-01-25 15:34, Peter Scott wrote: On Mon, 23 Jan 2012 12:38:44 -0500, Nemana, Satya wrote: I tried perl -c also with the same results. It takes 4-5 minutes to know that I missed a some where. It is very painful. 4-5 minutes?! Either you have an unbearably slow computer or something is not right. Please post details. It sounds like some module is doing ridiculous computations in its main code instead of being encapsulated in subroutines. It should be tracked down and shot^Wrefactored. That's likely to cause all kinds of problems, so working around it like you're trying isn't really the answer. I once coded use Time::HiRes ( sleep time ); It never finished compiling. -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
How to compile just the current perl module, ignoring all the other included modules
Hi Gurus I have to compile a perl module which includes a lot of other modules. The other modules will not change during compilations of my current module. Only my current module keeps on changing. The compiler however starts compiling from all the modules included in the current module with the use directive and the dependent modules. Is there any way to work around this intelligence of the perl compiler to ignore the compilation on the other modules and just compile the current program/module? I want these errors if any to be only caught in the run time. (although it will not happen because ultimately I will compile the complete modules to run the program) Thanks, Regards, Satya
Re: How to compile just the current perl module, ignoring all the other included modules
On 12-01-23 11:20 AM, Nemana, Satya wrote: Hi Gurus I have to compile a perl module which includes a lot of other modules. The other modules will not change during compilations of my current module. Only my current module keeps on changing. The compiler however starts compiling from all the modules included in the current module with the use directive and the dependent modules. Is there any way to work around this intelligence of the perl compiler to ignore the compilation on the other modules and just compile the current program/module? I want these errors if any to be only caught in the run time. (although it will not happen because ultimately I will compile the complete modules to run the program) Thanks, Regards, Satya Perl has to compile and run the modules yours depends on to have the correct context. Without them, it cannot determine if your module is correct. Try: perl -c MyModule.pm -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. Strength is not a measure of the body. It's a measure of the heart. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
RE: How to compile just the current perl module, ignoring all the other included modules
Hi Shawn I tried perl -c also with the same results. It takes 4-5 minutes to know that I missed a some where. It is very painful. Is there no other way? Thanks, Regards, Satya -Original Message- From: Shawn H Corey [mailto:shawnhco...@gmail.com] Sent: 23 January 2012 16:38 To: beginners@perl.org Subject: Re: How to compile just the current perl module, ignoring all the other included modules On 12-01-23 11:20 AM, Nemana, Satya wrote: Hi Gurus I have to compile a perl module which includes a lot of other modules. The other modules will not change during compilations of my current module. Only my current module keeps on changing. The compiler however starts compiling from all the modules included in the current module with the use directive and the dependent modules. Is there any way to work around this intelligence of the perl compiler to ignore the compilation on the other modules and just compile the current program/module? I want these errors if any to be only caught in the run time. (although it will not happen because ultimately I will compile the complete modules to run the program) Thanks, Regards, Satya Perl has to compile and run the modules yours depends on to have the correct context. Without them, it cannot determine if your module is correct. Try: perl -c MyModule.pm -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. Strength is not a measure of the body. It's a measure of the heart. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: How to compile just the current perl module, ignoring all the other included modules
On 12-01-23 12:38 PM, Nemana, Satya wrote: I tried perl -c also with the same results. It takes 4-5 minutes to know that I missed a some where. It is very painful. Is there no other way? That's very unusual, most scripts take only a few seconds to compile. Try: perl -MO=Deparse MyModule.pm -- Just my 0.0002 million dollars worth, Shawn Programming is as much about organization and communication as it is about coding. Strength is not a measure of the body. It's a measure of the heart. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Executing remote command without using any modules
Hi All, I create following bash script to run some block of commands on remote server and get information but I try to do same using Perl but I couldn't make it so any one can suggest way to get done this using perl ? (please without using any modules) my .sh... ssh -T $LOGIN EOI cd /x02/oracle/downloads find ./ -type d | sed -e 's/[^-][^\/]*\//--/g;s/--/ |-/' DirectoryStructure.txt cat DirectoryStructure.txt exit EOI thanks
Re: Executing remote command without using any modules
On Wed, Jan 18, 2012 at 5:31 AM, charith charith...@gmail.com wrote: Hi All, I create following bash script to run some block of commands on remote server and get information but I try to do same using Perl but I couldn't make it so any one can suggest way to get done this using perl ? (please without using any modules) my .sh... ssh -T $LOGIN EOI cd /x02/oracle/downloads find ./ -type d | sed -e 's/[^-][^\/]*\//--/g;s/--/ |-/' DirectoryStructure.txt cat DirectoryStructure.txt exit EOI thanks The simplest way to do this is to use the exec command it is not the right way by any means but it should work most of the time. The main problems you will find is that you cannot do much error handling, you would basically only be able to see if your script executed SSH correctly or not and that is all that you would be able to do... As far as output you should be able to capture that but it would be just plain old flat text any other work you might want to do with it you would have to do using regular expressions etc... All in all it is not a nice solution, but if you really cannot use modules then you are likely stuck with it. I would advise you to have a look at the Net::OpenSSH module. I know you said no modules but hear me out... Net::OpenSSH is a pure perl module that doesn't have any mandatory dependencies (obviously, besides requiring OpenSSH binaries). This means that you could include it as a part of your program as a module that does not need installing as there is no need to do this. Of course you will have to go into the gutts of the module and find out how it calls the OpenSSH binaries and make sure that you deal with a situation where the binaries are in another location then the one on your machine and of course the case where the are not installed at all. It is going to be a nasty thing and you will have to deal with solving the same problem over and over again with every new release of the Net::OpenSSH module you want to use... You also will need to deal with stuff like outdated versions of OpenSSH and other such wonderful situations. Personally I would not go this route but it really depends on what you need to do if all you need is just a directory listing the exec command might be enough, if you are looking for more things and need to do proper error handling then you will most likely need to find a way to deal with a module anyway. By the way, if you are using SSH to connect to remote machines why could you not simply run this on a single machine? This would make your life a lot simpler as getting a module installed on a single machine is a lot less arguing with the administrator of the server park then getting it installed on a lot of machines. After all if you are to use perl but have to live without modules then what is the point... Perl without modules is like C/C++ without external libraries it will work but it is going to be a massive pain in the rear and likely a very difficult slow and error prone job. Regards, Rob
FW: can only install cpan modules as sudo
May I please re-iterate again: please send replies to this thread to the list, not me. All it takes is a quick look at to whom you are addressing your email to then the list will receive it not me alone. Thank You. Phil. -- Forwarded Message From: fudmer rieley southofmex...@yahoo.com Date: Fri, 23 Dec 2011 15:56:33 -0800 (PST) To: Phil Dobbin phildob...@gmail.com Subject: Re: can only install cpan modules as sudo in response to the question of writing a perl to python converter i forwarded to the list thisand no one has responded nor has it appeared on the list.. is something wrong with the list? Maybe a better project would be to work toward the development of a standard xsl style sheet able to parse source code or binary of each software language into a tree such that xslt could parse the intermediate tree and transform its structure into a multitude of other language source codes or binaries. I do not know if it would be easier to work at the binary level than the source code level. But I believe much of the technology to transform source code and binaries from one language set to another language set already exist. xsl, xslt tools I believe have a perfect fit in perl. XSL [code lang1], [ XSLT :: XSLT ], XSL [code lang2[ Parse the code, build the tree::parse the tree, output the new code. Merely writing xsl parsing and tree layouts for each language [source or complied binary] and conforming the xsl style sheet to the xslt transform standards, the machine genetics and super protected kernels that talk to them, might resolve to trivial. Moreover there are lots of persons with transforming experience around who might help. Is it not possible to develop the transforms between languages in xslt style sheet fashion? Would such a transform impose on the copyright or patent rights of one or more languages or language parts? --- On Wed, 12/21/11, Phil Dobbin phildob...@gmail.com wrote: From: Phil Dobbin phildob...@gmail.com Subject: Re: can only install cpan modules as sudo To: perl beginners@perl.org Date: Wednesday, December 21, 2011, 1:26 PM On 21/12/11 17:59, Ryan.Barracuda ryan.barrac...@elboardo.com wrote: Thanks! Would you recommend I uninstall ActiveState and install Perlbrew first? Depends whereabouts it is on your machine. If ActiveState resides in ~/ then yes, I would. If not, it's entirely optional you can just go ahead install perlbrew as per the defaults. This blog should help you get started: http://blog.fox.geek.nz/2010/09/installing-multiple-perls-with.html Cheers, Phil... -- Nothing to see here... move along, move along -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- End of Forwarded Message -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: FW: can only install cpan modules as sudo
--- On Fri, 12/23/11, Phil Dobbin phildob...@gmail.com wrote: From: Phil Dobbin phildob...@gmail.com Subject: FW: can only install cpan modules as sudo To: perl beginners@perl.org Cc: fudmer rieley southofmex...@yahoo.com Date: Friday, December 23, 2011, 7:13 PM in response to the question of writing a perl to python converter i Maybe a better project would be to work toward the development of a standard xsl style sheet able to parse source code or binary of each software language into a tree such that xslt could parse the intermediate tree and transform its structure into a multitude of other language source codes or binaries. I do not know if it would be easier to work at the binary level than the source code level. But I believe much of the technology to transform source code and binaries from one language set to another language set already exist. xsl, xslt tools I believe have a perfect fit in perl. XSL [code lang1], [ XSLT :: XSLT ], XSL [code lang2[ Parse the code, build the tree::parse the tree, output the new code. Merely writing xsl parsing and tree layouts for each language [source or complied binary] and conforming the xsl style sheet to the xslt transform standards, the machine genetics and super protected kernels that talk to them, might resolve to trivial. Moreover there are lots of persons with transforming experience around who might help. Is it not possible to develop the transforms between languages in xslt style sheet fashion? Would such a transform impose on the copyright or patent rights of one or more languages or language parts? --- On Wed, 12/21/11, Phil Dobbin phildob...@gmail.com wrote: From: Phil Dobbin phildob...@gmail.com Subject: Re: can only install cpan modules as sudo To: perl beginners@perl.org Date: Wednesday, December 21, 2011, 1:26 PM On 21/12/11 17:59, Ryan.Barracuda ryan.barrac...@elboardo.com wrote: Thanks! Would you recommend I uninstall ActiveState and install Perlbrew first? Depends whereabouts it is on your machine. If ActiveState resides in ~/ then yes, I would. If not, it's entirely optional you can just go ahead install perlbrew as per the defaults. This blog should help you get started: http://blog.fox.geek.nz/2010/09/installing-multiple-perls-with.html Cheers, Phil... -- Nothing to see here... move along, move along -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- End of Forwarded Message -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
can only install cpan modules as sudo
Hi all, I can only install cpan modules as sudo. I installed ActiveState Perl v.5.14.2 and cpanm without a problem. $ cpanm Net::SMTP -bash: /usr/local/bin/cpanm: /usr/bin/perl: bad interpreter: No such file or directory However, with sudo $ sudo cpanm Net::SMTP Net::SMTP is up to date. (2.31) How do I install cpan modules without being sudo? Ryan
Re: can only install cpan modules as sudo
Another example: ryan-munsons-macbook-pro:bin barracuda$ cpanm MIME::Entity -bash: /usr/local/bin/cpanm: /usr/bin/perl: bad interpreter: No such file or directory This was not installed. When using sudo, however: ryan-munsons-macbook-pro:bin barracuda$ cpanm MIME::Entity -bash: /usr/local/bin/cpanm: /usr/bin/perl: bad interpreter: No such file or directory ryan-munsons-macbook-pro:bin barracuda$ sudo cpanm MIME::Entity Password: -- Working on MIME::Entity Fetching http://search.cpan.org/CPAN/authors/id/D/DS/DSKOLL/MIME-tools-5.502.tar.gz ... OK Configuring MIME-tools-5.502 ... OK == Found dependencies: Test::Deep, Mail::Header, Mail::Field, Mail::Internet -- Working on Test::Deep Fetching http://search.cpan.org/CPAN/authors/id/R/RJ/RJBS/Test-Deep-0.108.tar.gz ... OK Configuring Test-Deep-0.108 ... OK == Found dependencies: Test::Tester, Test::NoWarnings -- Working on Test::Tester Fetching http://search.cpan.org/CPAN/authors/id/F/FD/FDALY/Test-Tester-0.108.tar.gz ... OK Configuring Test-Tester-0.108 ... OK Building and testing Test-Tester-0.108 ... OK Successfully installed Test-Tester-0.108 -- Working on Test::NoWarnings Fetching http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/Test-NoWarnings-1.04.tar.g z ... OK Configuring Test-NoWarnings-1.04 ... OK Building and testing Test-NoWarnings-1.04 ... OK Successfully installed Test-NoWarnings-1.04 Building and testing Test-Deep-0.108 ... OK Successfully installed Test-Deep-0.108 -- Working on Mail::Header Fetching http://search.cpan.org/CPAN/authors/id/M/MA/MARKOV/MailTools-2.08.tar.gz ... OK Configuring MailTools-2.08 ... OK == Found dependencies: Date::Format, Test::Pod, Date::Parse -- Working on Date::Format Fetching http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/TimeDate-1.20.tar.gz ... OK Configuring TimeDate-1.20 ... OK Building and testing TimeDate-1.20 ... OK Successfully installed TimeDate-1.20 -- Working on Test::Pod Fetching http://search.cpan.org/CPAN/authors/id/D/DW/DWHEELER/Test-Pod-1.45.tar.gz ... OK Configuring Test-Pod-1.45 ... OK Building and testing Test-Pod-1.45 ... OK Successfully installed Test-Pod-1.45 Building and testing MailTools-2.08 ... OK Successfully installed MailTools-2.08 Building and testing MIME-tools-5.502 ... FAIL ! Installing MIME::Entity failed. See /Users/barracuda/.cpanm/build.log for details. 6 distributions installed Looks like this had a failure anyway From /Users/barracuda/.cpanm/build.log accept failed: Operation timed out at t/Smtpsend.t line 46. # Looks like your test exited with 60 before it could output anything. t/Smtpsend.t .. Dubious, test returned 60 (wstat 15360, 0x3c00) Failed 9/9 subtests t/ticket-11901.t .. ok t/ticket-22684.t .. ok t/ticket-37139.t .. ok t/ticket-41632.t .. ok t/ticket-43439.t .. ok t/ticket-52924.t .. ok t/ticket-60931.t .. ok t/ticket-65681.t .. ok t/ticket-66025.t .. ok t/WordDecoder.t ... ok t/WordEncoder.t ... ok t/Words.t . ok Test Summary Report --- t/Smtpsend.t(Wstat: 15360 Tests: 0 Failed: 0) Non-zero exit status: 60 Parse errors: Bad plan. You planned 9 tests but ran 0. Files=32, Tests=401, 15 wallclock secs ( 0.14 usr 0.07 sys + 3.23 cusr 0.44 csys = 3.88 CPU) Result: FAIL Failed 1/32 test programs. 0/401 subtests failed. make: *** [test_dynamic] Error 255 - FAIL Installing MIME::Entity failed. See /Users/barracuda/.cpanm/build.log for details. 6 distributions installed Ryan From: Chankey Pathak chankey...@gmail.com Date: Wed, 21 Dec 2011 22:00:15 +0530 To: Ryan Munson ryan.barrac...@elboardo.com Subject: Re: can only install cpan modules as sudo Dude you have already installed that. What's wrong now? On Wed, Dec 21, 2011 at 9:57 PM, Ryan.Barracuda ryan.barrac...@elboardo.com wrote: Hi all, I can only install cpan modules as sudo. I installed ActiveState Perl v.5.14.2 and cpanm without a problem. $ cpanm Net::SMTP -bash: /usr/local/bin/cpanm: /usr/bin/perl: bad interpreter: No such file or directory However, with sudo $ sudo cpanm Net::SMTP Net::SMTP is up to date. (2.31) How do I install cpan modules without being sudo? Ryan -- Regards, Chankey Pathak http://javaenthusiastic.blogspot.com
Re: can only install cpan modules as sudo
On 21/12/11 16:27, Ryan.Barracuda ryan.barrac...@elboardo.com wrote: I can only install cpan modules as sudo. I installed ActiveState Perl v.5.14.2 and cpanm without a problem. $ cpanm Net::SMTP -bash: /usr/local/bin/cpanm: /usr/bin/perl: bad interpreter: No such file or directory However, with sudo $ sudo cpanm Net::SMTP Net::SMTP is up to date. (2.31) How do I install cpan modules without being sudo? I'd suggest perlbrew: http://www.perlbrew.pl/ I highly recommend it. HTH, Cheers, Phil... -- Nothing to see here... move along, move along -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: can only install cpan modules as sudo
Thanks! Would you recommend I uninstall ActiveState and install Perlbrew first? Ryan On 12/21/11 12:52 PM, Phil Dobbin phildob...@gmail.com wrote: On 21/12/11 16:27, Ryan.Barracuda ryan.barrac...@elboardo.com wrote: I can only install cpan modules as sudo. I installed ActiveState Perl v.5.14.2 and cpanm without a problem. $ cpanm Net::SMTP -bash: /usr/local/bin/cpanm: /usr/bin/perl: bad interpreter: No such file or directory However, with sudo $ sudo cpanm Net::SMTP Net::SMTP is up to date. (2.31) How do I install cpan modules without being sudo? I'd suggest perlbrew: http://www.perlbrew.pl/ I highly recommend it. HTH, Cheers, Phil... -- Nothing to see here... move along, move along -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/ -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: can only install cpan modules as sudo
On 21/12/11 17:59, Ryan.Barracuda ryan.barrac...@elboardo.com wrote: Thanks! Would you recommend I uninstall ActiveState and install Perlbrew first? Depends whereabouts it is on your machine. If ActiveState resides in ~/ then yes, I would. If not, it's entirely optional you can just go ahead install perlbrew as per the defaults. This blog should help you get started: http://blog.fox.geek.nz/2010/09/installing-multiple-perls-with.html Cheers, Phil... -- Nothing to see here... move along, move along -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Console Modules for Windows (DOS mode)
Does anybody know of any modules to create console applications for windows? I don't want a GUI like tk does. I want it to be text based and run in a DOS window. I saw the below example but couldn't get the curses module to work in Windows. This is a good example of what I'd like to do. http://drdobbs.com/web-development/184416181?pgno=2 Google wasn't any help but it was probably the terms I used. Thanks.
Re: Console Modules for Windows (DOS mode)
Hi Steven, On Sat, 05 Nov 2011 11:58:37 -0500 Steven Perry spe...@sprynet.com wrote: Does anybody know of any modules to create console applications for windows? I don't want a GUI like tk does. I want it to be text based and run in a DOS window. I saw the below example but couldn't get the curses module to work in Windows. This is a good example of what I'd like to do. http://drdobbs.com/web-development/184416181?pgno=2 I recall being told by someone that he had a problem getting PDcurses up and running on Windows. You can try http://metacpan.org/release/Win32-Console as long as you don't mind your code being Win32/Win64-only. If you do, then create a layer of abstraction for it and Curses. Regards, Shlomi Fish Google wasn't any help but it was probably the terms I used. Thanks. -- - Shlomi Fish http://www.shlomifish.org/ http://www.shlomifish.org/humour/ways_to_do_it.html “My name is Inigo Montoya. You forced my father to write XSLT. Prepare to die! And be thankful I don’t force you to write XSLT.” Please reply to list if it's a mailing list post - http://shlom.in/reply . -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: Strawberry Perl Installing CPAN modules
Shlomi, I installed Terdata software packages like cli, teragss, and tdicu. I edited windows hosts file. Now I got the following error. dmake.exe: makefile: line 871: Error: -- Missing targets or attributes in rule The following perl script is used to connect to SQL server database using DBI and DBD::ODBC modules. *my *$dbh = DBI-*connect*(DBI:ODBC:Driver={SQL Server};Server=$db_instance;Database=$db_name;UID=$db_user;PWD=$db_pass) or *die*(\n\nCONNECT ERROR:\n\n$DBI::errstr); Using ODBC I am getting the following error. DBI connect('Driver={Teradata};Server=edwdevcop1;Database=HYP_STG_DEV;UID=hypshared;PWD=**','',...) failed: [Teradata][ODBC Teradata Driver] Not enough information to log on (SQL-28000) at Teradata_test.pl line 46 Any help is appreciated. Thank you. On Fri, Sep 23, 2011 at 4:11 AM, Shlomi Fish shlo...@shlomifish.org wrote: Hi, On Wed, 21 Sep 2011 11:30:10 -0400 Perl developer perldevelopm...@gmail.com wrote: Thanks for the reply. How to install the headers? you probably need to install the Teradata development package. Its installation procedure should be documented somewhere there. It's probably here: http://downloads.teradata.com/download Regards, Shlomi Fish On Wed, Sep 21, 2011 at 11:23 AM, Shlomi Fish shlo...@shlomifish.org wrote: On Wed, 21 Sep 2011 09:31:01 -0400 Perl developer perldevelopm...@gmail.com wrote: All, I need help regarding install of CPAN modules in strawberry perl. I have a question about Perl connectivity to Teradata. Is it the correct email address? I have been using Active Perl 5.12 on Windows xp since one year. I tried installing a perl module from CPAN and I got errors while performing the following steps. perl makefile.pl n|d(make) n|d(make) install Recently I downloaded strawberry perl 5.12.3.0 and download CPAN module named DBD::Teradata-1.52. Using cpan client, I could download cpan module(get command). Files related to the module are created at C:\strawberry\cpan\build\DBD-Teradata-1.52-tLHaX2 But I get errors while installing them using Teradata.xs:5:22: coptypes.h: No such file or directory Teradata.xs:6:21: dbcarea.h: No such file or directory Teradata.xs:7:20: coperr.h: No such file or directory Teradata.xs:8:20: parcel.h: No such file or directory You're missing some headers. You need to install them. Regards, Shlomi Fish Teradata.xs:34: error: syntax error before DBCAREA Teradata.xs:34: warning: no semicolon at end of struct or union Teradata.xs:35: warning: data definition has no type or storage class Teradata.xs: In function `XS_DBD__Teradata__Cli_tdxs_set_debug': Teradata.xs:57: error: syntax error before dbcp Teradata.xs:58: error: `dbcp' undeclared (first use in this function) Teradata.xs:58: error: (Each undeclared identifier is reported only once Teradata.xs:58: error: for each function it appears in.) Teradata.xs: In function `XS_DBD__Teradata__Cli_tdxs_init_dbcarea': Teradata.xs:67: error: syntax error before dbc_ctx Teradata.xs:68: error: `DBCAREA' undeclared (first use in this function) Teradata.xs:68: error: `dbcp' undeclared (first use in this function) Teradata.xs:72: error: `dbc_ctx' undeclared (first use in this function) Teradata.xs:72: error: syntax error before ')' token Teradata.xs:78: error: `EM_OK' undeclared (first use in this function) Teradata.xs: In function `XS_DBD__Teradata__Cli_tdxs_get_connection': Teradata.xs:101: error: syntax error before dbc_ctx Teradata.xs:102: error: `DBCAREA' undeclared (first use in this function) Teradata.xs:102: error: `dbcp' undeclared (first use in this function) Teradata.xs:102: error: `dbc_ctx' undeclared (first use in this function) Teradata.xs:149: error: `DBFCON' undeclared (first use in this function) Teradata.xs:156: error: `EM_OK' undeclared (first use in this function) Teradata.xs:176: error: `DBFFET' undeclared (first use in this function) Teradata.xs:184: error: `PclLSN' undeclared (first use in this function) Teradata.xs:188: error: `PclSUCCESS' undeclared (first use in this function) Teradata.xs:191: error: `PclFAILURE' undeclared (first use in this function) Teradata.xs:192: error: `PclERROR' undeclared (first use in this function) Teradata.xs:204: error: `PclENDSTATEMENT' undeclared (first use in this function ) Teradata.xs:205: error: `PclENDREQUEST' undeclared (first use in this function) Teradata.xs:213: error: `REQEXHAUST' undeclared (first use in this function) Teradata.xs:234: error: `DBFERQ' undeclared (first use in this function) Teradata.xs: In function `XS_DBD__Teradata__Cli_tdxs_get_tdat_release': Teradata.xs:256: error: `dbc_ctx' undeclared (first use in this function) Teradata.xs:256: error: syntax
Re: Strawberry Perl Installing CPAN modules
Hi, On Wed, 21 Sep 2011 11:30:10 -0400 Perl developer perldevelopm...@gmail.com wrote: Thanks for the reply. How to install the headers? you probably need to install the Teradata development package. Its installation procedure should be documented somewhere there. It's probably here: http://downloads.teradata.com/download Regards, Shlomi Fish On Wed, Sep 21, 2011 at 11:23 AM, Shlomi Fish shlo...@shlomifish.orgwrote: On Wed, 21 Sep 2011 09:31:01 -0400 Perl developer perldevelopm...@gmail.com wrote: All, I need help regarding install of CPAN modules in strawberry perl. I have a question about Perl connectivity to Teradata. Is it the correct email address? I have been using Active Perl 5.12 on Windows xp since one year. I tried installing a perl module from CPAN and I got errors while performing the following steps. perl makefile.pl n|d(make) n|d(make) install Recently I downloaded strawberry perl 5.12.3.0 and download CPAN module named DBD::Teradata-1.52. Using cpan client, I could download cpan module(get command). Files related to the module are created at C:\strawberry\cpan\build\DBD-Teradata-1.52-tLHaX2 But I get errors while installing them using Teradata.xs:5:22: coptypes.h: No such file or directory Teradata.xs:6:21: dbcarea.h: No such file or directory Teradata.xs:7:20: coperr.h: No such file or directory Teradata.xs:8:20: parcel.h: No such file or directory You're missing some headers. You need to install them. Regards, Shlomi Fish Teradata.xs:34: error: syntax error before DBCAREA Teradata.xs:34: warning: no semicolon at end of struct or union Teradata.xs:35: warning: data definition has no type or storage class Teradata.xs: In function `XS_DBD__Teradata__Cli_tdxs_set_debug': Teradata.xs:57: error: syntax error before dbcp Teradata.xs:58: error: `dbcp' undeclared (first use in this function) Teradata.xs:58: error: (Each undeclared identifier is reported only once Teradata.xs:58: error: for each function it appears in.) Teradata.xs: In function `XS_DBD__Teradata__Cli_tdxs_init_dbcarea': Teradata.xs:67: error: syntax error before dbc_ctx Teradata.xs:68: error: `DBCAREA' undeclared (first use in this function) Teradata.xs:68: error: `dbcp' undeclared (first use in this function) Teradata.xs:72: error: `dbc_ctx' undeclared (first use in this function) Teradata.xs:72: error: syntax error before ')' token Teradata.xs:78: error: `EM_OK' undeclared (first use in this function) Teradata.xs: In function `XS_DBD__Teradata__Cli_tdxs_get_connection': Teradata.xs:101: error: syntax error before dbc_ctx Teradata.xs:102: error: `DBCAREA' undeclared (first use in this function) Teradata.xs:102: error: `dbcp' undeclared (first use in this function) Teradata.xs:102: error: `dbc_ctx' undeclared (first use in this function) Teradata.xs:149: error: `DBFCON' undeclared (first use in this function) Teradata.xs:156: error: `EM_OK' undeclared (first use in this function) Teradata.xs:176: error: `DBFFET' undeclared (first use in this function) Teradata.xs:184: error: `PclLSN' undeclared (first use in this function) Teradata.xs:188: error: `PclSUCCESS' undeclared (first use in this function) Teradata.xs:191: error: `PclFAILURE' undeclared (first use in this function) Teradata.xs:192: error: `PclERROR' undeclared (first use in this function) Teradata.xs:204: error: `PclENDSTATEMENT' undeclared (first use in this function ) Teradata.xs:205: error: `PclENDREQUEST' undeclared (first use in this function) Teradata.xs:213: error: `REQEXHAUST' undeclared (first use in this function) Teradata.xs:234: error: `DBFERQ' undeclared (first use in this function) Teradata.xs: In function `XS_DBD__Teradata__Cli_tdxs_get_tdat_release': Teradata.xs:256: error: `dbc_ctx' undeclared (first use in this function) Teradata.xs:256: error: syntax error before ')' token Teradata.xs:257: error: `DBCAREA' undeclared (first use in this function) Teradata.xs:257: error: `dbcp' undeclared (first use in this function) Teradata.xs: In function `XS_DBD__Teradata__Cli_tdxs_cleanup': Teradata.xs:272: error: syntax error before dbc_ctx Teradata.xs:273: error: `DBCAREA' undeclared (first use in this function) Teradata.xs:273: error: `dbcp' undeclared (first use in this function) Teradata.xs:273: error: `dbc_ctx' undeclared (first use in this function) Teradata.xs:277: error: `DBFDSC' undeclared (first use in this function) Teradata.xs:280: error: `EM_OK' undeclared (first use in this function) Teradata.xs: In function `XS_DBD__Teradata__Cli_tdxs_send_request': Teradata.xs:302: error: syntax error before dbc_ctx Teradata.xs:303: error: `DBCAREA' undeclared (first use in this function) Teradata.xs:303: error: `dbcp' undeclared (first use in this function) Teradata.xs:303: error