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/
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/