module for development

2011-12-15 Thread Ken Peng
Hello, Which module could show the order of loading modules? For example, use Foo; use Bar; BEGIN { require A; } I want to know in what order Perl loads these modules. Thanks. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail:

Re: module for development

2011-12-15 Thread shawn wilson
Strace stat(64) should do you. On Dec 15, 2011 8:03 AM, Ken Peng short...@gmail.com wrote: Hello, Which module could show the order of loading modules? For example, use Foo; use Bar; BEGIN { require A; } I want to know in what order Perl loads these modules. Thanks. -- To

Re: module for development

2011-12-15 Thread Brian Fraser
On Thu, Dec 15, 2011 at 10:09 AM, shawn wilson ag4ve...@gmail.com wrote: Strace stat(64) should do you. On Dec 15, 2011 8:03 AM, Ken Peng short...@gmail.com wrote: Hello, Which module could show the order of loading modules? For example, use Foo; use Bar; BEGIN {

Re: module for development

2011-12-15 Thread Ken Peng
2011/12/15 Brian Fraser frase...@gmail.com: The second way is using an @INC hook, which is explained in perldoc -f require. Here's a pretty simple form: BEGIN { unshift @INC, sub { say @_[0..$#_]; return } } But the real question here is, why do you need to know this? Thanks Brian, your

Re: module for development

2011-12-15 Thread shawn wilson
On Thu, Dec 15, 2011 at 09:02, Ken Peng short...@gmail.com wrote: 2011/12/15 Brian Fraser frase...@gmail.com: Since these modules exist in  the same library dir as Evernote.pm. (in my OS it's /usr/local/share/perl/5.10.0/Net/Evernote.pm) But their names are not began with Net::“ as they

Re: module for development

2011-12-15 Thread Ken Peng
2011/12/15 shawn wilson ag4ve...@gmail.com: hence why i recommended strace so that you could see where perl looks for modules and in what order. that said, if someone has a way inside perl to do the same thing, it might be cool to know. Yup I did the strace as you suggested and got some

Re: module for development

2011-12-15 Thread Jenda Krynicky
From: Brian Fraser frase...@gmail.com On Thu, Dec 15, 2011 at 10:09 AM, shawn wilson ag4ve...@gmail.com wrote: Strace stat(64) should do you. On Dec 15, 2011 8:03 AM, Ken Peng short...@gmail.com wrote: Hello, Which module could show the order of loading modules? For example,

Re: module for development

2011-12-15 Thread Brian Fraser
On Thu, Dec 15, 2011 at 11:02 AM, Ken Peng short...@gmail.com wrote: 2011/12/15 Brian Fraser frase...@gmail.com: The second way is using an @INC hook, which is explained in perldoc -f require. Here's a pretty simple form: BEGIN { unshift @INC, sub { say @_[0..$#_]; return } } But

Re: module for development

2011-12-15 Thread Shawn H Corey
On 11-12-15 09:02 AM, Ken Peng wrote: BEGIN { my $module_dir = $INC{'Net/Evernote.pm'}; $module_dir =~ s/Evernote\.pm$//; unshift @INC,$module_dir; } This begin block setup the @INC by adding a path as the module itself, it does work. Try this instead (no BEGIN needed):

Re: module for development

2011-12-15 Thread Brian Fraser
On Thu, Dec 15, 2011 at 12:00 PM, Shawn H Corey shawnhco...@gmail.comwrote: On 11-12-15 09:02 AM, Ken Peng wrote: BEGIN { my $module_dir = $INC{'Net/Evernote.pm'}; $module_dir =~ s/Evernote\.pm$//; unshift @INC,$module_dir; } This begin block setup the @INC by adding a path

Re: module for development

2011-12-15 Thread Ken Peng
Hm, that's not quite right. It updates %INC as soon as it can open a filehandle and start reading, but I don't think it ever updates @INC unless you ask it to (e.g. by 'use lib' or -I on the command line, or mucking with it manually). sorry my typo. it is %inc not @inc. if perl updates %inc as

Re: module for development

2011-12-15 Thread Shawn H Corey
On 11-12-15 10:09 AM, Brian Fraser wrote: Close, but that won't work, because keys in %INC are paths, and you are still leaving the ::'s unchanged. use 5.014; use File::Basename; # must be before `use lib` use lib dirname( $INC{ __PACKAGE__ =~ s!::!/!r . '.pm' } ); That should do. Plus more

Re: ipc question

2011-12-15 Thread Peter Scott
On Wed, 14 Dec 2011 20:42:10 -0300, Tessio Fechine wrote: I have a cgi application that has a two way communication with a ldap application via open2: I need to keep communicating with the same ldap.pl process as other cgi scripts are launched: Sounds like you want a named pipe. -- Peter

Re: module for development

2011-12-15 Thread Shlomi Fish
Hi Ken, On Thu, 15 Dec 2011 21:01:28 +0800 Ken Peng short...@gmail.com wrote: Hello, Which module could show the order of loading modules? For example, use Foo; use Bar; BEGIN { require A; } I want to know in what order Perl loads these modules. See:

Re: split function

2011-12-15 Thread Chris Stinemetz
I'm getting a bit closer. There a couple roadblocks I am up against. I am able to split the lines by white space, but for some reason the program isn't capturing the first lines to the @fieldValue array after the @headerNames array. Once I get all the lines to go into the array correctly I would

Guidance for a New Programmer/Perl User

2011-12-15 Thread Mark Tiesman
Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so to speak, but am looking for addition

Re: Guidance for a New Programmer/Perl User

2011-12-15 Thread Mark Tiesman
Thanks Frank. I'll add that to my list. ;-) Mark On 12/15/2011 10:07 AM, frank cui wrote: I found Perl By Example 4th Edition book pretty help, and you may want to give a look on that one. Frank On Thu, Dec 15, 2011 at 11:54 AM, Mark Tiesman mark.ties...@doit.wisc.edu

RE: split function

2011-12-15 Thread Ken Slater
-Original Message- From: Chris Stinemetz [mailto:chrisstinem...@gmail.com] Sent: Thursday, December 15, 2011 10:47 AM To: John W. Krahn Cc: Perl Beginners Subject: Re: split function I'm getting a bit closer. There a couple roadblocks I am up against. I am able to split the

Re: Guidance for a New Programmer/Perl User

2011-12-15 Thread Torqued
perlmonks.org is a good site. regards... /om On Dec 15, 2011, at 21:38, Mark Tiesman mark.ties...@doit.wisc.edu wrote: Thanks Frank. I'll add that to my list. ;-) Mark On 12/15/2011 10:07 AM, frank cui wrote: I found Perl By Example 4th Edition book pretty help, and you may want to

Re: Guidance for a New Programmer/Perl User

2011-12-15 Thread Tessio Fechine
2011/12/15 Mark Tiesman mark.ties...@doit.wisc.edu Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease

Re: split function

2011-12-15 Thread Dr.Ruud
On 2011-12-14 05:43, Chris Stinemetz wrote: I am trying to split the first element of an array by white space then continue reading the rest of the file. Thus far I am having trouble figuring out how to split the first line. You have an XY problem, you are probably looking for

Re: Guidance for a New Programmer/Perl User

2011-12-15 Thread Agnello George
On Thu, Dec 15, 2011 at 9:24 PM, Mark Tiesman mark.ties...@doit.wisc.edu wrote: Hi all.  I recently started a job that at some point is going to require me knowing and using Perl.  I am pretty green as a programmer and need some guidance to get me going on the right foot.  Currently I am

Re: Guidance for a New Programmer/Perl User

2011-12-15 Thread Chankey Pathak
*http://www.chankeypathak.com/search/label/Perl* * * On Thu, Dec 15, 2011 at 10:20 PM, Agnello George agnello.dso...@gmail.comwrote: On Thu, Dec 15, 2011 at 9:24 PM, Mark Tiesman mark.ties...@doit.wisc.edu wrote: Hi all. I recently started a job that at some point is going to require me

Re: Guidance for a New Programmer/Perl User

2011-12-15 Thread Dr.Ruud
On 2011-12-15 16:54, Mark Tiesman wrote: general information on learning to program and Perl How to Perl: http://learn.perl.org/ which mentions: http://learn.perl.org/books/ -- Ruud -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail:

Re: Guidance for a New Programmer/Perl User

2011-12-15 Thread Madrigal, Juan A
The Learning Perl by Randal Schwartz Video series is a nice intro: http://shop.oreilly.com/product/0636920014430.do Along with the companion book Learning Perl (6ed): http://shop.oreilly.com/product/0636920018452.do Lynda.com also offers Perl 5 Essential Training by Bill Weinman:

Re: Guidance for a New Programmer/Perl User

2011-12-15 Thread Shlomi Fish
Hi Mark, On Thu, 15 Dec 2011 09:54:17 -0600 Mark Tiesman mark.ties...@doit.wisc.edu wrote: Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot.

Re: split function

2011-12-15 Thread Chris Stinemetz
On Thu, Dec 15, 2011 at 10:42 AM, Dr.Ruud rvtol+use...@isolution.nl wrote: On 2011-12-14 05:43, Chris Stinemetz wrote: I am trying to split the first element of an array by white space then continue reading the rest of the file. Thus far I am having trouble figuring out how to split the first

Re: Guidance for a New Programmer/Perl User

2011-12-15 Thread Mark Tiesman
shlomi, Thanks for the link. I have bookmarked:-) On 12/15/2011 11:56 AM, Shlomi Fish wrote: Hi Mark, On Thu, 15 Dec 2011 09:54:17 -0600 Mark Tiesmanmark.ties...@doit.wisc.edu wrote: Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am

Re: Guidance for a New Programmer/Perl User

2011-12-15 Thread Brendan Gilroy
Here are some new videos: http://szabgab.com/perl_tutorial.html The standard stuff is here: http://www.perl.org/learn.html http://learn.perl.org/first_steps/http://learn.perl.org/ And this is what I was originally looking for: http://perl-tutorial.org/ It's a curated list of tutorials. On

RE: split function

2011-12-15 Thread Ken Slater
-Original Message- From: Ken Slater [mailto:kl...@psu.edu] Sent: Thursday, December 15, 2011 11:09 AM To: 'Chris Stinemetz'; 'John W. Krahn' Cc: 'Perl Beginners' Subject: RE: split function -Original Message- From: Chris Stinemetz [mailto:chrisstinem...@gmail.com]

Re: split function

2011-12-15 Thread Rob Dixon
On 15/12/2011 15:47, Chris Stinemetz wrote: I'm getting a bit closer. There a couple roadblocks I am up against. I am able to split the lines by white space, but for some reason the program isn't capturing the first lines to the @fieldValue array after the @headerNames array. Once I get

Re: split function

2011-12-15 Thread Rob Dixon
On 15/12/2011 16:09, Ken Slater wrote: I have not been following this too closely, but I don't understand the algorithm used to get the above output. What is that Ken? If you don't understand the question then ask some questions of your own! I would have named it @fieldValues since arrays

Re: split function

2011-12-15 Thread Chris Stinemetz
Tool completed successfully Thank you Rob! This is what I was trying to accomplish. I'm going to have to research to find out exactly what you did. Thanks agian, Chris -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org

RE: split function

2011-12-15 Thread Ken Slater
To: Perl Beginners Cc: Ken Slater; Chris Stinemetz Subject: Re: split function On 15/12/2011 16:09, Ken Slater wrote: I have not been following this too closely, but I don't understand the algorithm used to get the above output. What is that Ken? If you don't understand the

Re: Guidance for a New Programmer/Perl User

2011-12-15 Thread Rajeev Prasad
Mark, i think with an eye on future, you should start by reading Rakudo etc. i.e. perl6 From: Mark Tiesman mark.ties...@doit.wisc.edu To: beginners@perl.org Sent: Thursday, December 15, 2011 9:54 AM Subject: Guidance for a New Programmer/Perl User Hi all. 

Re: split function

2011-12-15 Thread Shlomi Fish
Hi Chris, On Thu, 15 Dec 2011 11:58:00 -0600 Chris Stinemetz chrisstinem...@gmail.com wrote: On Thu, Dec 15, 2011 at 10:42 AM, Dr.Ruud rvtol+use...@isolution.nl wrote: On 2011-12-14 05:43, Chris Stinemetz wrote: I am trying to split the first element of an array by white space then

Re: Guidance for a New Programmer/Perl User

2011-12-15 Thread Brendan
How quickly Perl 6 knowledge can be put to good use probably depends on where you work. I don't think there are many businesses where they are looking to convert their Perl 5 code to Perl 6 in the immediate future. Rajeev Prasad rp.ne...@yahoo.com wrote: Mark, i think with an eye on future,

Re: Guidance for a New Programmer/Perl User

2011-12-15 Thread Shlomi Fish
Hi Rajeev, On Thu, 15 Dec 2011 15:20:24 -0500 Brendan bdgil...@gmail.com wrote: How quickly Perl 6 knowledge can be put to good use probably depends on where you work. I don't think there are many businesses where they are looking to convert their Perl 5 code to Perl 6 in the immediate

Re: split function

2011-12-15 Thread Chris Stinemetz
Is that your company's policy, or do you just lack root access? If it's the latter, then see the various resources at http://perl-begin.org/topics/cpan/ , so you can see how to install Perl modules from CPAN under your home directory. It isn't a company policy just circumstance. The unix

Re: Guidance for a New Programmer/Perl User

2011-12-15 Thread Rajeev Prasad
Shlomi, all of you said is correct, but some may get a negative impression. it shows as if perl5 and perl 6 are two very different. perl5 is dead end (coz perl 6 is not like 5), perl6 which is in making for so long is still not ready. for a new person, this could mean less confidence in perl

Re: Guidance for a New Programmer/Perl User

2011-12-15 Thread Anneli Cuss
for a new person, this could mean less confidence in perl and more interest towards php etc... ty. Rajeev Hi Rajeev, The idea is not to curry favour with one language or another, but help a person get on with what they're doing. If Mark needs to know Perl for his job, then I think we can

Re: Guidance for a New Programmer/Perl User

2011-12-15 Thread Rob Dixon
Decades of programming in many languages have convinced me that Perl excels in every aspect. But I have to agree with Rajeev that Perl 6 has become a theory and needs evidence of practical application. In my mind there is no doubt of the benefits in Perl, but what place does it have? And what are

Re: Guidance for a New Programmer/Perl User

2011-12-15 Thread Madrigal, Juan A
Have you looked at these MVC perl frameworks and alternatives to CGI? They definitely go beyond a simple print. mojolicious http://mojolicio.us/ dancer http://perldancer.org/ Catalyst http://www.catalystframework.org/ Web.pm https://github.com/masak/web psgi http://plackperl.org/

Re: Guidance for a New Programmer/Perl User

2011-12-15 Thread David Christensen
On 12/15/2011 07:54 AM, Mark Tiesman wrote: Hi all. I recently started a job that at some point is going to require me knowing and using Perl. I am pretty green as a programmer and need some guidance to get me going on the right foot. Currently I am reading the Llama book to grease the skids so

Re: module for development

2011-12-15 Thread Ken Peng
2011/12/15 Shlomi Fish shlo...@shlomifish.org: See: http://search.cpan.org/dist/Devel-TraceUse/ Great module, the result it prints is good. Thanks Shlomi. Ken. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org