From angrygreg at gmail.com Fri Apr 16 18:13:12 2010 From: angrygreg at gmail.com (Greg Akins) Date: Fri, 16 Apr 2010 21:13:12 -0400 Subject: [pgh-pm] Time::HighRes Message-ID: Trying to setup Whistle control on my Mac following this blog entry http://www.mostlymaths.net/2009/09/whistle-control-your-computer.html There is a suggestion to use Time::HighRes, but I get the following error: Can't locate Time/HighRes.pm in @INC (@INC contains: /Library/Perl/Updates/5.10.0 /System/Library/Perl/5.10.0/darwin-thread-multi-2level /System/Library/Perl/5.10.0 /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 /Network/Library/Perl/5.10.0/darwin-thread-multi-2level /Network/Library/Perl/5.10.0 /Network/Library/Perl /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level /System/Library/Perl/Extras/5.10.0 .) at cmdWhistle.pl line 5. BEGIN failed--compilation aborted at cmdWhistle.pl line 5. I suspect the library just isn't installed.. But I'm very inexperience at Perl.. Is this just a matter of going to CPAN and finding it? Any other pointers before I screw up my Perl installation? -- Greg Akins http://insomnia-consulting.org http://www.pghcodingdojo.org http://pittjug.dev.java.net http://twitter.com/akinsgre http://www.linkedin.com/in/akinsgre From m.nooning at comcast.net Sat Apr 17 05:48:11 2010 From: m.nooning at comcast.net (Malcolm Nooning) Date: Sat, 17 Apr 2010 08:48:11 -0400 Subject: [pgh-pm] Time::HighRes In-Reply-To: References: Message-ID: <4BC9AE0B.9020202@comcast.net> I went to a Windows prompt box and entered "ppm", which popped up the ActiveState Perl Package Manager. It took a long time, but eventually the scroll window with a long list of packages loaded up. I scrolled down to "Time::HighRes", so, for my Perl 5.10 at least, it is available as a prepackaged, um, package. I already had it installed but I clicked on the little green (mark for install) icon anyway, as there is a slightly newer version available. I then clicked on the green arrow to install it, etc. The only real pain is that the ppm seems to freeze the part of my screen when it is doing something, and it seems to take numbers of minutes. Eventually it finished. If your Perl is from ActiveState, but a different version, well, it should still work the same way. Good luck. Greg Akins wrote: > Trying to setup Whistle control on my Mac following this blog entry > http://www.mostlymaths.net/2009/09/whistle-control-your-computer.html > > There is a suggestion to use Time::HighRes, but I get the following error: > > Can't locate Time/HighRes.pm in @INC (@INC contains: > /Library/Perl/Updates/5.10.0 > /System/Library/Perl/5.10.0/darwin-thread-multi-2level > /System/Library/Perl/5.10.0 > /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 > /Network/Library/Perl/5.10.0/darwin-thread-multi-2level > /Network/Library/Perl/5.10.0 /Network/Library/Perl > /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level > /System/Library/Perl/Extras/5.10.0 .) at cmdWhistle.pl line 5. > BEGIN failed--compilation aborted at cmdWhistle.pl line 5. > > I suspect the library just isn't installed.. But I'm very inexperience > at Perl.. Is this just a matter of going to CPAN and finding it? Any > other pointers before I screw up my Perl installation? > > From angrygreg at gmail.com Sat Apr 17 09:07:13 2010 From: angrygreg at gmail.com (Greg Akins) Date: Sat, 17 Apr 2010 12:07:13 -0400 Subject: [pgh-pm] Time::HighRes In-Reply-To: References: <4BC9AE0B.9020202@comcast.net> Message-ID: Thanks every one. I wasn't sure about the standard way to install modules on the Mac It's 'cpan' Other than spelling HiRes wrong the first time, I got it installed but now I get this error (Haven't googled yet) Can't locate Time/HighRes.pm in @INC (@INC contains: /Library/Perl/Updates/5.10.0/darwin-thread-multi-2level /Library/Perl/Updates/5.10.0 /System/Library/Perl/5.10.0/darwin-thread-multi-2level /System/Library/Perl/5.10.0 /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 /Network/Library/Perl/5.10.0/darwin-thread-multi-2level /Network/Library/Perl/5.10.0 /Network/Library/Perl /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level /System/Library/Perl/Extras/5.10.0 .) at cmdWhistle.pl line 5. BEGIN failed--compilation aborted at cmdWhistle.pl line 5. On Sat, Apr 17, 2010 at 10:28 AM, Jason Campbell wrote: > One of the most useful things you can learn about when using perl is how to > access and install CPAN packages from your platform. ?This is because there > are so many useful packages available via CPAN. ?As Malcom points out, > there's PPM on Active State's distribution, but that is Windows-specific. ?I > haven't used Perl on a Mac, so I don't know specifics for your case. ?If the > Mac works like Perl on other Unixes you can just use the CPAN module to > fetch Time::HiRes: > > ? perl -MCPAN -e 'install Time::HiRes' > > Or you can start an interactive session with CPAN: > ? perl -MCPAN -e shell > > then enter 'install Time::HiRes'. > > Note that CPAN.pm fetches source, so unlike PPM which is a binary module > system, CPAN.pm may require you to have working build tools on your system > if you install packages which aren't pure Perl. ?(compiler, make, maybe even > automake & autoconf) > > Jason. > > > On Sat, 17 Apr 2010 08:48:11 -0400, Malcolm Nooning > wrote: > >> I went to a Windows prompt box and entered "ppm", which popped up the >> ActiveState Perl Package Manager. ?It took a long time, but eventually the >> scroll window with a long list of packages loaded up. ?I scrolled down to >> "Time::HighRes", so, for my Perl 5.10 at least, it is available as a >> prepackaged, um, package. ?I already had it installed but I clicked on the >> little green (mark for install) icon anyway, as there is a slightly newer >> version available. ?I then clicked on the green arrow to install it, etc. >> >> The only real pain is that the ppm seems to freeze the part of my screen >> when it is doing something, and it seems to take numbers of minutes. >> ?Eventually it finished. >> >> If your Perl is from ActiveState, but a different version, well, it should >> still work the same way. >> >> Good luck. >> >> Greg Akins wrote: >>> >>> Trying to setup Whistle control on my Mac following this blog entry >>> http://www.mostlymaths.net/2009/09/whistle-control-your-computer.html >>> >>> There is a suggestion to use Time::HighRes, but I get the following >>> error: >>> >>> Can't locate Time/HighRes.pm in @INC (@INC contains: >>> /Library/Perl/Updates/5.10.0 >>> /System/Library/Perl/5.10.0/darwin-thread-multi-2level >>> /System/Library/Perl/5.10.0 >>> /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 >>> /Network/Library/Perl/5.10.0/darwin-thread-multi-2level >>> /Network/Library/Perl/5.10.0 /Network/Library/Perl >>> /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level >>> /System/Library/Perl/Extras/5.10.0 .) at cmdWhistle.pl line 5. >>> BEGIN failed--compilation aborted at cmdWhistle.pl line 5. >>> >>> I suspect the library just isn't installed.. But I'm very inexperience >>> at Perl.. Is this just a matter of going to CPAN and finding it? ?Any >>> other pointers before I screw up my Perl installation? >>> >>> >> _______________________________________________ >> pgh-pm mailing list >> pgh-pm at pm.org >> http://mail.pm.org/mailman/listinfo/pgh-pm > > > -- Greg Akins http://insomnia-consulting.org http://www.pghcodingdojo.org http://pittjug.dev.java.net http://twitter.com/akinsgre http://www.linkedin.com/in/akinsgre From angrygreg at gmail.com Sat Apr 17 16:49:14 2010 From: angrygreg at gmail.com (Greg Akins) Date: Sat, 17 Apr 2010 19:49:14 -0400 Subject: [pgh-pm] Time::HighRes In-Reply-To: References: <4BC9AE0B.9020202@comcast.net> Message-ID: I've spent a couple hours today trying to figure out why my system still thinks that Time::HiRes isn't installed. Finally, I found the perldoc command.. which shows that Time::HiRes is installed.. and the path matches one that is in @inc (from the error message I got when trying to execute this program) I did try to 'find / -name HighRes.pm' to see if the module was installed, but didn't have any luck output from perldoc - Sat Apr 17 09:46:22 2010: "Module" Time::HiRes ? "installed into: /Library/Perl/Updates/5.10.0" On Sat, Apr 17, 2010 at 12:07 PM, Greg Akins wrote: > Thanks every one. ?I wasn't sure about the standard way to install > modules on the Mac > > It's 'cpan' ?Other than spelling HiRes wrong the first time, I got it > installed but now I get this error (Haven't googled yet) > > Can't locate Time/HighRes.pm in @INC (@INC contains: > /Library/Perl/Updates/5.10.0/darwin-thread-multi-2level > /Library/Perl/Updates/5.10.0 > /System/Library/Perl/5.10.0/darwin-thread-multi-2level > /System/Library/Perl/5.10.0 > /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 > /Network/Library/Perl/5.10.0/darwin-thread-multi-2level > /Network/Library/Perl/5.10.0 /Network/Library/Perl > /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level > /System/Library/Perl/Extras/5.10.0 .) at cmdWhistle.pl line 5. > BEGIN failed--compilation aborted at cmdWhistle.pl line 5. > > > On Sat, Apr 17, 2010 at 10:28 AM, Jason Campbell wrote: >> One of the most useful things you can learn about when using perl is how to >> access and install CPAN packages from your platform. ?This is because there >> are so many useful packages available via CPAN. ?As Malcom points out, >> there's PPM on Active State's distribution, but that is Windows-specific. ?I >> haven't used Perl on a Mac, so I don't know specifics for your case. ?If the >> Mac works like Perl on other Unixes you can just use the CPAN module to >> fetch Time::HiRes: >> >> ? perl -MCPAN -e 'install Time::HiRes' >> >> Or you can start an interactive session with CPAN: >> ? perl -MCPAN -e shell >> >> then enter 'install Time::HiRes'. >> >> Note that CPAN.pm fetches source, so unlike PPM which is a binary module >> system, CPAN.pm may require you to have working build tools on your system >> if you install packages which aren't pure Perl. ?(compiler, make, maybe even >> automake & autoconf) >> >> Jason. >> >> >> On Sat, 17 Apr 2010 08:48:11 -0400, Malcolm Nooning >> wrote: >> >>> I went to a Windows prompt box and entered "ppm", which popped up the >>> ActiveState Perl Package Manager. ?It took a long time, but eventually the >>> scroll window with a long list of packages loaded up. ?I scrolled down to >>> "Time::HighRes", so, for my Perl 5.10 at least, it is available as a >>> prepackaged, um, package. ?I already had it installed but I clicked on the >>> little green (mark for install) icon anyway, as there is a slightly newer >>> version available. ?I then clicked on the green arrow to install it, etc. >>> >>> The only real pain is that the ppm seems to freeze the part of my screen >>> when it is doing something, and it seems to take numbers of minutes. >>> ?Eventually it finished. >>> >>> If your Perl is from ActiveState, but a different version, well, it should >>> still work the same way. >>> >>> Good luck. >>> >>> Greg Akins wrote: >>>> >>>> Trying to setup Whistle control on my Mac following this blog entry >>>> http://www.mostlymaths.net/2009/09/whistle-control-your-computer.html >>>> >>>> There is a suggestion to use Time::HighRes, but I get the following >>>> error: >>>> >>>> Can't locate Time/HighRes.pm in @INC (@INC contains: >>>> /Library/Perl/Updates/5.10.0 >>>> /System/Library/Perl/5.10.0/darwin-thread-multi-2level >>>> /System/Library/Perl/5.10.0 >>>> /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 >>>> /Network/Library/Perl/5.10.0/darwin-thread-multi-2level >>>> /Network/Library/Perl/5.10.0 /Network/Library/Perl >>>> /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level >>>> /System/Library/Perl/Extras/5.10.0 .) at cmdWhistle.pl line 5. >>>> BEGIN failed--compilation aborted at cmdWhistle.pl line 5. >>>> >>>> I suspect the library just isn't installed.. But I'm very inexperience >>>> at Perl.. Is this just a matter of going to CPAN and finding it? ?Any >>>> other pointers before I screw up my Perl installation? >>>> >>>> >>> _______________________________________________ >>> pgh-pm mailing list >>> pgh-pm at pm.org >>> http://mail.pm.org/mailman/listinfo/pgh-pm >> >> >> > > > > -- > Greg Akins > > http://insomnia-consulting.org > http://www.pghcodingdojo.org > http://pittjug.dev.java.net > http://twitter.com/akinsgre > http://www.linkedin.com/in/akinsgre > -- Greg Akins http://insomnia-consulting.org http://www.pghcodingdojo.org http://pittjug.dev.java.net http://twitter.com/akinsgre http://www.linkedin.com/in/akinsgre From angrygreg at gmail.com Sat Apr 17 17:29:10 2010 From: angrygreg at gmail.com (Greg Akins) Date: Sat, 17 Apr 2010 20:29:10 -0400 Subject: [pgh-pm] Time::HighRes In-Reply-To: References: <4BC9AE0B.9020202@comcast.net> Message-ID: On Sat, Apr 17, 2010 at 7:49 PM, Greg Akins wrote: > I've spent a couple hours today trying to figure out why my system > still thinks that Time::HiRes isn't installed. I'm not sure what I did, but i got it working. Since I just removed the additions I made, and applied a patch that I found in another blog (to the cmdWhistle.pl script) it seems I might have just had a stupid typos. Thanks for the direction though. I wouldn't have known where to start without the help -- Greg Akins http://insomnia-consulting.org http://www.pghcodingdojo.org http://pittjug.dev.java.net http://twitter.com/akinsgre http://www.linkedin.com/in/akinsgre From dan at onelifemedia.com Sat Apr 17 07:05:00 2010 From: dan at onelifemedia.com (Daniel) Date: Sat, 17 Apr 2010 10:05:00 -0400 Subject: [pgh-pm] Time::HighRes In-Reply-To: <4BC9AE0B.9020202@comcast.net> References: <4BC9AE0B.9020202@comcast.net> Message-ID: <4BC9C00C.4040604@onelifemedia.com> In addition, I'm on an Ubuntu 9.10 machine and do not have ActiveState perl so I do not have ppm. I install cpan modules by going to the terminal and typing: cpan Time::HighRes The first time you use the cpan command there are some configuration hoops to jump though, just press enter to take the default for anything you are unsure of. Cheers! Malcolm Nooning wrote: > I went to a Windows prompt box and entered "ppm", which popped up the > ActiveState Perl Package Manager. It took a long time, but eventually > the scroll window with a long list of packages loaded up. I scrolled > down to "Time::HighRes", so, for my Perl 5.10 at least, it is > available as a prepackaged, um, package. I already had it installed > but I clicked on the little green (mark for install) icon anyway, as > there is a slightly newer version available. I then clicked on the > green arrow to install it, etc. > > The only real pain is that the ppm seems to freeze the part of my > screen when it is doing something, and it seems to take numbers of > minutes. Eventually it finished. > > If your Perl is from ActiveState, but a different version, well, it > should still work the same way. > > Good luck. > > Greg Akins wrote: >> Trying to setup Whistle control on my Mac following this blog entry >> http://www.mostlymaths.net/2009/09/whistle-control-your-computer.html >> >> There is a suggestion to use Time::HighRes, but I get the following >> error: >> >> Can't locate Time/HighRes.pm in @INC (@INC contains: >> /Library/Perl/Updates/5.10.0 >> /System/Library/Perl/5.10.0/darwin-thread-multi-2level >> /System/Library/Perl/5.10.0 >> /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 >> /Network/Library/Perl/5.10.0/darwin-thread-multi-2level >> /Network/Library/Perl/5.10.0 /Network/Library/Perl >> /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level >> /System/Library/Perl/Extras/5.10.0 .) at cmdWhistle.pl line 5. >> BEGIN failed--compilation aborted at cmdWhistle.pl line 5. >> >> I suspect the library just isn't installed.. But I'm very inexperience >> at Perl.. Is this just a matter of going to CPAN and finding it? Any >> other pointers before I screw up my Perl installation? >> >> > _______________________________________________ > pgh-pm mailing list > pgh-pm at pm.org > http://mail.pm.org/mailman/listinfo/pgh-pm From dan at onelifemedia.com Sat Apr 17 09:33:08 2010 From: dan at onelifemedia.com (Daniel) Date: Sat, 17 Apr 2010 12:33:08 -0400 Subject: [pgh-pm] Time::HighRes In-Reply-To: References: <4BC9AE0B.9020202@comcast.net> Message-ID: <4BC9E2C4.7030305@onelifemedia.com> After I sent my reply this morning I did a little head scratching myself. The module is called Timer::HiRes but you are getting an error for Timer::HighRes, Check line 5. If I had a nickel for every time had convinced myself that code I was debugging said one thing when it really said something completely different ... well, I'd've already made 10 cents today. Dan Greg Akins wrote: > Thanks every one. I wasn't sure about the standard way to install > modules on the Mac > > It's 'cpan' Other than spelling HiRes wrong the first time, I got it > installed but now I get this error (Haven't googled yet) > > Can't locate Time/HighRes.pm in @INC (@INC contains: > /Library/Perl/Updates/5.10.0/darwin-thread-multi-2level > /Library/Perl/Updates/5.10.0 > /System/Library/Perl/5.10.0/darwin-thread-multi-2level > /System/Library/Perl/5.10.0 > /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 > /Network/Library/Perl/5.10.0/darwin-thread-multi-2level > /Network/Library/Perl/5.10.0 /Network/Library/Perl > /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level > /System/Library/Perl/Extras/5.10.0 .) at cmdWhistle.pl line 5. > BEGIN failed--compilation aborted at cmdWhistle.pl line 5. > > > On Sat, Apr 17, 2010 at 10:28 AM, Jason Campbell wrote: > >> One of the most useful things you can learn about when using perl is how to >> access and install CPAN packages from your platform. This is because there >> are so many useful packages available via CPAN. As Malcom points out, >> there's PPM on Active State's distribution, but that is Windows-specific. I >> haven't used Perl on a Mac, so I don't know specifics for your case. If the >> Mac works like Perl on other Unixes you can just use the CPAN module to >> fetch Time::HiRes: >> >> perl -MCPAN -e 'install Time::HiRes' >> >> Or you can start an interactive session with CPAN: >> perl -MCPAN -e shell >> >> then enter 'install Time::HiRes'. >> >> Note that CPAN.pm fetches source, so unlike PPM which is a binary module >> system, CPAN.pm may require you to have working build tools on your system >> if you install packages which aren't pure Perl. (compiler, make, maybe even >> automake & autoconf) >> >> Jason. >> >> >> On Sat, 17 Apr 2010 08:48:11 -0400, Malcolm Nooning >> wrote: >> >> >>> I went to a Windows prompt box and entered "ppm", which popped up the >>> ActiveState Perl Package Manager. It took a long time, but eventually the >>> scroll window with a long list of packages loaded up. I scrolled down to >>> "Time::HighRes", so, for my Perl 5.10 at least, it is available as a >>> prepackaged, um, package. I already had it installed but I clicked on the >>> little green (mark for install) icon anyway, as there is a slightly newer >>> version available. I then clicked on the green arrow to install it, etc. >>> >>> The only real pain is that the ppm seems to freeze the part of my screen >>> when it is doing something, and it seems to take numbers of minutes. >>> Eventually it finished. >>> >>> If your Perl is from ActiveState, but a different version, well, it should >>> still work the same way. >>> >>> Good luck. >>> >>> Greg Akins wrote: >>> >>>> Trying to setup Whistle control on my Mac following this blog entry >>>> http://www.mostlymaths.net/2009/09/whistle-control-your-computer.html >>>> >>>> There is a suggestion to use Time::HighRes, but I get the following >>>> error: >>>> >>>> Can't locate Time/HighRes.pm in @INC (@INC contains: >>>> /Library/Perl/Updates/5.10.0 >>>> /System/Library/Perl/5.10.0/darwin-thread-multi-2level >>>> /System/Library/Perl/5.10.0 >>>> /Library/Perl/5.10.0/darwin-thread-multi-2level /Library/Perl/5.10.0 >>>> /Network/Library/Perl/5.10.0/darwin-thread-multi-2level >>>> /Network/Library/Perl/5.10.0 /Network/Library/Perl >>>> /System/Library/Perl/Extras/5.10.0/darwin-thread-multi-2level >>>> /System/Library/Perl/Extras/5.10.0 .) at cmdWhistle.pl line 5. >>>> BEGIN failed--compilation aborted at cmdWhistle.pl line 5. >>>> >>>> I suspect the library just isn't installed.. But I'm very inexperience >>>> at Perl.. Is this just a matter of going to CPAN and finding it? Any >>>> other pointers before I screw up my Perl installation? >>>> >>>> >>>> >>> _______________________________________________ >>> pgh-pm mailing list >>> pgh-pm at pm.org >>> http://mail.pm.org/mailman/listinfo/pgh-pm >>> >> >> > > > > From angrygreg at gmail.com Mon Apr 19 04:58:51 2010 From: angrygreg at gmail.com (Greg Akins) Date: Mon, 19 Apr 2010 07:58:51 -0400 Subject: [pgh-pm] Time::HighRes In-Reply-To: <4BC9E2C4.7030305@onelifemedia.com> References: <4BC9AE0B.9020202@comcast.net> <4BC9E2C4.7030305@onelifemedia.com> Message-ID: On Sat, Apr 17, 2010 at 12:33 PM, Daniel wrote: > After I sent my reply this morning I did a little head scratching myself. > ?The module is called Timer::HiRes but you are getting an error for > Timer::HighRes, Check line 5. > Thanks Daniel.. I think that was the problem and I noticed that I had mistakenly mis-spelled it in some of the emails, but didn't even notice the misspelling in the file.. ( I even think I checked that at one time). That explains why the simple act of rewriting it using the patch I found fixed the issue :-/ In retrospect, I think that not only was that my problem, but installing HiRes wasn't even necessary. On Perl 5.10, I believe it's already present in core Perl. -- Greg Akins http://insomnia-consulting.org http://www.pghcodingdojo.org http://pittjug.dev.java.net http://twitter.com/akinsgre http://www.linkedin.com/in/akinsgre