Re: sure would be nice if Perl had trace command built-in
I tend to use Strawberry perl these days and would certainly recommend it. Regarding the file paths you mentioned, the double back slash is correct but also difficult to read. I change my windows scripts to use File::Spec paths whenever I have to revisit them. This makes paths portable and easy on the eye. I also find Test::Vars a useful tool for cleaning up code. It will find unused variables. Good luck, Dermot. On 12 Dec 2015 14:22, "Mike Flannigan" wrote: > > > On 12/10/2015 5:40 AM, beginners-digest-h...@perl.org wrote: > > > > > > On Mon, Dec 7, 2015 at 6:33 PM, Brock Wilcox > wrote: > > > Give devel::trace or devel::tracemore a try :) > > Is it possible to install this from Active State repository without > having an-up-date ActiveState Perl DevKit license? > > Thanks, > Ken Wolcott > > > > FYI, my ActiveState PPM ver 4.17 pointed to repository: > http://ppm4.activestate.com/MSWin32-x64/5.16/1603/package.xml > does list Devel-Trace version 0.12. > I did not try to install it. > > I have never had an ActiveState Perl DevKit license, or > certainly didn't pay for it. > > > > Mike > > >
Re: sure would be nice if Perl had trace command built-in
On 12/10/2015 5:40 AM, beginners-digest-h...@perl.org wrote: On Mon, Dec 7, 2015 at 6:33 PM, Brock Wilcox wrote: >Give devel::trace or devel::tracemore a try:) Is it possible to install this from Active State repository without having an-up-date ActiveState Perl DevKit license? Thanks, Ken Wolcott FYI, my ActiveState PPM ver 4.17 pointed to repository: http://ppm4.activestate.com/MSWin32-x64/5.16/1603/package.xml does list Devel-Trace version 0.12. I did not try to install it. I have never had an ActiveState Perl DevKit license, or certainly didn't pay for it. Mike
Re: sure would be nice if Perl had trace command built-in
On Mon, Dec 7, 2015 at 9:35 PM, Kenneth Wolcott wrote: > On Mon, Dec 7, 2015 at 6:31 PM, Kenneth Wolcott > wrote: > > Hi; > > > > I've inherited a lot of Perl [mostly ActiveState] (and bash) scripts > > were the former writers and maintainers did not use "use strict" and > > "use warnings" and have other "less than Best Practices". Most of the > > scripts are executed on Windows and some of them are executed on a Mac > > and some are executed on Linux. There is apparently a massive amount > > of dead code and duplicate code. There are weird dependencies here > > and there on Cygwin. Apparently there was an earlier (still present?) > > dependency on MKTools. Some scripts need to be modified prior to > > first build on a new branch. The builds sometimes work fine and > > sometimes fail in strange ways. > > > > It would be nice if there was a trace facility built-in to Perl that > > I could enable that would tell me each line number of each script that > > was currently executing. > > > > I'd love to replace all the Active State Perl code with either > > Cygwin Perl or Strawberry Perl. Of course I'd like to replace the > > Windows machines with Linux, but that's not going to happen :-) > > > > One of the strange things I see happening is that a path construct > > of "c:\\dir1\\dir2\\filename" (not quoted in the script is being > > parsed as "c:\dir1\di2filename" which seems strange. Another > > situation that seems strange is the use of three backslashes together. > > I thought that if you had to backslash a backslash it would always > > come in pairs. What is strange is that this thing works sometimes and > > then doesn't work sometimes. > > > > Now I'm here late at work trying to figure out why the build > > infrastructure is broken. > > > > Thanks, > > Ken Wolcott > > Of course we don't have the Active State Perl Debugger activated, as > apparently that requires a license, which apparently is too expensive. > > Would be nice to be able to use Cygwin Perl or Strawberry Perl or even > Linux Perl so that I'd have a debugger. > > > > I have used ActiveState's Perl Development Kit (PDK) in the past, so I will pass along some info. First, having a licensed PDK does not give you access to modules - that is free (they give you various tools including a debugger).. Second, their licensing of the PDK is a bit strange, as it is by user. So, if there was a license on your system, it was probably for another user. Third, you should be able to use the normal Perl debugger (-d option). However, if someone installed the PDK, then the ActiveState debugger may be overriding the normal debugger. To turn off the ActiveState debugger follow these steps (which I grabbed from the ActiveStates site at some point - probably over two years ago): When the Perl Dev Kit is installed, the PDK's Graphical Debugger becomes the default debugger, replacing the console debugger included with your Perl distribution. To disable the Graphical Debugger included with the Perl Dev Kit and use the console debugger instead, perform the following steps: 1. Ensure that the Graphical Debugger is set to local mode. ○ On the command line, enter pdkdebug --query to view the current mode. ○ If necessary, enter pdkdebug --local to set the debug listener to local mode. 2. Set the debugger to the console debugger included with Perl 5.x. On the command line, enter: set PERL5DB=BEGIN { require 'perl5db.pl' } set PERLDB_OPTS= To disable the Graphical Debugger permanently, remove the PERL5DB key from HKEY_LOCAL_MACHINE\SOFTWARE\Perl and remove the PERLDB_OPTS system environment variable. HTH, Ken
Re: sure would be nice if Perl had trace command built-in
On Mon, Dec 7, 2015 at 6:41 PM, Brock Wilcox wrote: > I don't know. But I think that worst case you can just download the single > file from this library and add it to your application directly. It requires > no compilation or anything. > > https://metacpan.org/source/MJD/Devel-Trace-0.12/Trace.pm > > --Brock > > On Mon, Dec 7, 2015 at 9:39 PM, Kenneth Wolcott > wrote: >> >> On Mon, Dec 7, 2015 at 6:33 PM, Brock Wilcox >> wrote: >> > Give devel::trace or devel::tracemore a try :) >> >> Is it possible to install this from Active State repository without >> having an-up-date ActiveState Perl DevKit license? Hi Brock; Thanks so much for the tip! It helps a lot! I think I'll have to thank the author directly. Now if the code was only in Perl instead of a chain of bash to Perl to bash to Perl calls :-) Thanks, Ken -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: sure would be nice if Perl had trace command built-in
I don't know. But I think that worst case you can just download the single file from this library and add it to your application directly. It requires no compilation or anything. https://metacpan.org/source/MJD/Devel-Trace-0.12/Trace.pm --Brock On Mon, Dec 7, 2015 at 9:39 PM, Kenneth Wolcott wrote: > On Mon, Dec 7, 2015 at 6:33 PM, Brock Wilcox > wrote: > > Give devel::trace or devel::tracemore a try :) > > Is it possible to install this from Active State repository without > having an-up-date ActiveState Perl DevKit license? > > Thanks, > Ken Wolcott >
Re: sure would be nice if Perl had trace command built-in
On Mon, Dec 7, 2015 at 6:33 PM, Brock Wilcox wrote: > Give devel::trace or devel::tracemore a try :) Is it possible to install this from Active State repository without having an-up-date ActiveState Perl DevKit license? Thanks, Ken Wolcott -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: sure would be nice if Perl had trace command built-in
On Mon, Dec 7, 2015 at 6:31 PM, Kenneth Wolcott wrote: > Hi; > > I've inherited a lot of Perl [mostly ActiveState] (and bash) scripts > were the former writers and maintainers did not use "use strict" and > "use warnings" and have other "less than Best Practices". Most of the > scripts are executed on Windows and some of them are executed on a Mac > and some are executed on Linux. There is apparently a massive amount > of dead code and duplicate code. There are weird dependencies here > and there on Cygwin. Apparently there was an earlier (still present?) > dependency on MKTools. Some scripts need to be modified prior to > first build on a new branch. The builds sometimes work fine and > sometimes fail in strange ways. > > It would be nice if there was a trace facility built-in to Perl that > I could enable that would tell me each line number of each script that > was currently executing. > > I'd love to replace all the Active State Perl code with either > Cygwin Perl or Strawberry Perl. Of course I'd like to replace the > Windows machines with Linux, but that's not going to happen :-) > > One of the strange things I see happening is that a path construct > of "c:\\dir1\\dir2\\filename" (not quoted in the script is being > parsed as "c:\dir1\di2filename" which seems strange. Another > situation that seems strange is the use of three backslashes together. > I thought that if you had to backslash a backslash it would always > come in pairs. What is strange is that this thing works sometimes and > then doesn't work sometimes. > > Now I'm here late at work trying to figure out why the build > infrastructure is broken. > > Thanks, > Ken Wolcott Of course we don't have the Active State Perl Debugger activated, as apparently that requires a license, which apparently is too expensive. Would be nice to be able to use Cygwin Perl or Strawberry Perl or even Linux Perl so that I'd have a debugger. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/
Re: sure would be nice if Perl had trace command built-in
Give devel::trace or devel::tracemore a try :) On Dec 7, 2015 21:32, "Kenneth Wolcott" wrote: > Hi; > > I've inherited a lot of Perl [mostly ActiveState] (and bash) scripts > were the former writers and maintainers did not use "use strict" and > "use warnings" and have other "less than Best Practices". Most of the > scripts are executed on Windows and some of them are executed on a Mac > and some are executed on Linux. There is apparently a massive amount > of dead code and duplicate code. There are weird dependencies here > and there on Cygwin. Apparently there was an earlier (still present?) > dependency on MKTools. Some scripts need to be modified prior to > first build on a new branch. The builds sometimes work fine and > sometimes fail in strange ways. > > It would be nice if there was a trace facility built-in to Perl that > I could enable that would tell me each line number of each script that > was currently executing. > > I'd love to replace all the Active State Perl code with either > Cygwin Perl or Strawberry Perl. Of course I'd like to replace the > Windows machines with Linux, but that's not going to happen :-) > > One of the strange things I see happening is that a path construct > of "c:\\dir1\\dir2\\filename" (not quoted in the script is being > parsed as "c:\dir1\di2filename" which seems strange. Another > situation that seems strange is the use of three backslashes together. > I thought that if you had to backslash a backslash it would always > come in pairs. What is strange is that this thing works sometimes and > then doesn't work sometimes. > > Now I'm here late at work trying to figure out why the build > infrastructure is broken. > > Thanks, > Ken Wolcott > > -- > To unsubscribe, e-mail: beginners-unsubscr...@perl.org > For additional commands, e-mail: beginners-h...@perl.org > http://learn.perl.org/ > > >
sure would be nice if Perl had trace command built-in
Hi; I've inherited a lot of Perl [mostly ActiveState] (and bash) scripts were the former writers and maintainers did not use "use strict" and "use warnings" and have other "less than Best Practices". Most of the scripts are executed on Windows and some of them are executed on a Mac and some are executed on Linux. There is apparently a massive amount of dead code and duplicate code. There are weird dependencies here and there on Cygwin. Apparently there was an earlier (still present?) dependency on MKTools. Some scripts need to be modified prior to first build on a new branch. The builds sometimes work fine and sometimes fail in strange ways. It would be nice if there was a trace facility built-in to Perl that I could enable that would tell me each line number of each script that was currently executing. I'd love to replace all the Active State Perl code with either Cygwin Perl or Strawberry Perl. Of course I'd like to replace the Windows machines with Linux, but that's not going to happen :-) One of the strange things I see happening is that a path construct of "c:\\dir1\\dir2\\filename" (not quoted in the script is being parsed as "c:\dir1\di2filename" which seems strange. Another situation that seems strange is the use of three backslashes together. I thought that if you had to backslash a backslash it would always come in pairs. What is strange is that this thing works sometimes and then doesn't work sometimes. Now I'm here late at work trying to figure out why the build infrastructure is broken. Thanks, Ken Wolcott -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/