From fulko.hew at gmail.com Thu May 20 09:05:38 2010 From: fulko.hew at gmail.com (Fulko Hew) Date: Thu, 20 May 2010 12:05:38 -0400 Subject: [kw-pm] Fwd: Perl Survey 2010 In-Reply-To: <117165.50519.qm@web33304.mail.mud.yahoo.com> References: <117165.50519.qm@web33304.mail.mud.yahoo.com> Message-ID: Take some time to complete the Perl survey: http://blogs.perl.org/users/holy_zarquons_singing_fish/2010/05/the-perl-survey-2010-is-ready-for-you-to-complete.html -------------- next part -------------- An HTML attachment was scrubbed... URL: From daniel at coder.com Fri May 21 10:20:21 2010 From: daniel at coder.com (Daniel R. Allen) Date: Fri, 21 May 2010 13:20:21 -0400 (EDT) Subject: [kw-pm] UG News: Any O'Reilly ebook $9.99. (Friday 21 May only) Message-ID: ---------- Forwarded message ---------- Date: Fri, 21 May 2010 10:12:24 -0700 From: Marsee Henon To: daniel at coder.com Subject: UG News: *Free to Choose* Ebook Deal of the Day. Any O'Reilly ebook. Only $9.99. View this information as HTML in your browser, click here: http://post.oreilly.com/rd/9z1zmhle8pvu7cvp6vtj1s1g7r13d6oeojkf9sv6t00 *** Free to Choose *** Ebook Deal of the Day - Only $9.99 Our Ebook Deal of the Day is so popular, we want to make sure you know about it, and give you the chance to choose. Download in 4 DRM-free formats: PDF, .epub for iPad and iPhone, Kindle-compatible .mobi, and Android .apk. Learn more: http://post.oreilly.com/rd/9z1zfg19utrja9v9935pponpj1d3tjtmghg5te2fp4g Only $9.99. Choose any O'Reilly ebook from our list of over 2,000 titles. (Microsoft Press titles are excluded from this offer.) Enter code "FAVFA" in the O'Reilly cart. One Day Only: 5/21/2010 Buy Now and Save: http://post.oreilly.com/rd/9z1zmds2d03ctbpkt1mq24ucp4pgd594u87c6utsp5o -------------------------------------------------------------- O'Reilly - Spreading the knowledge of innovators | oreilly.com -------------------------------------------------------------- ================================================================ O'Reilly 1005 Gravenstein Highway North Sebastopol, CA 95472 800-998-9938 http://post.oreilly.com/rd/9z1zvr76fo4rf1rnvf6pisk456i7i7vlc1mbn54m7lo Follow us on Twitter at: http://post.oreilly.com/rd/9z1z61tvmg7fbdkjs69e0dd3sut01d2c80virp9vci8 You are receiving this email because you are a User Group contact with O'Reilly Media. If you would like to stop receiving these newsletters or announcements from O'Reilly, send an email to marsee at oreilly.com ================================================================ From daniel at coder.com Fri May 21 11:26:56 2010 From: daniel at coder.com (Daniel R. Allen) Date: Fri, 21 May 2010 14:26:56 -0400 (EDT) Subject: [kw-pm] kw-pm May meeting the 27th *ALSO* Sussman talk at U of W on the 25th Message-ID: We're meeting next Thursday, the 27th, to hear from one of Shuchit's colleages at Sybase. Guest presenter David Loop at Sybase will present on "Effective Presentation Styles" with lots of examples of effective and non-effective presentations. I'll send the usual Tuesday email reminding people to sign up on the pizza list. --- Also this upcoming week: UW CS Club is hosting Gerald Sussman on Tuesday and Wednesday: "Why Programming is a Good Medium for Expressing Poorly Understood and Sloppily Formulated Ideas" Gerald Jay Sussman, Panasonic Professor of Electrical Engineering, Massachusetts Institute of Technology 5:00 p.m.; MC 2066 "The Art of the Propagator" Location: MC 5158 Time: May 26, 5:00 PM http://en.wikipedia.org/wiki/Gerald_Jay_Sussman details here including abstracts of both talks: http://csclub.uwaterloo.ca/misc/sussman/ From daniel at coder.com Tue May 25 17:07:38 2010 From: daniel at coder.com (Daniel R. Allen) Date: Tue, 25 May 2010 20:07:38 -0400 (EDT) Subject: [kw-pm] kw-pm May meeting the 27th *ALSO* Sussman talk at U of W on the 25th and 26th In-Reply-To: Message-ID: Pizza reminder! http://kw.pm.org/wiki/index.cgi?PizzaList Sign up by Thursday 4pm, please. Hope to see you Thursday, -D On Fri, 21 May 2010, Daniel R. Allen wrote: > We're meeting next Thursday, the 27th, to hear from one of Shuchit's > colleages at Sybase. > > Guest presenter David Loop at Sybase will present on "Effective > Presentation Styles" with lots of examples of effective and non-effective > presentations. > > I'll send the usual Tuesday email reminding people to sign up on the pizza > list. > > --- > Also this upcoming week: UW CS Club is hosting Gerald Sussman on Tuesday > and Wednesday: > > "Why Programming is a Good Medium for Expressing Poorly Understood and > Sloppily Formulated Ideas" > Gerald Jay Sussman, Panasonic Professor of Electrical > Engineering, Massachusetts Institute of Technology > 5:00 p.m.; MC 2066 > > "The Art of the Propagator" > Location: MC 5158 > Time: May 26, 5:00 PM > > http://en.wikipedia.org/wiki/Gerald_Jay_Sussman > > details here including abstracts of both talks: > http://csclub.uwaterloo.ca/misc/sussman/ > > _______________________________________________ > kw-pm mailing list > kw-pm at pm.org > http://mail.pm.org/mailman/listinfo/kw-pm > From roberthpike at yahoo.com Wed May 26 13:28:38 2010 From: roberthpike at yahoo.com (Robert Pike) Date: Wed, 26 May 2010 13:28:38 -0700 (PDT) Subject: [kw-pm] Child and Parent Windows Message-ID: <711336.33991.qm@web120515.mail.ne1.yahoo.com> Just wondering if anyone came across this same sort of issue and, if so, how did you resolve/ work around it? I have a html page open in my browser that (upon clicking a button) opens a new window with a different domain. Once I fill out a form and submit it in the child window I get redirected to another page with the same domain as the parent/main window. The problem is I keep getting an "Access is denied" error on the child window when I try to access the parent window of the (now) same domain. Has anyone come across this and what's the best resolution to the problem? Thanks in advance for any suggestions. From rpjday at crashcourse.ca Thu May 27 11:57:43 2010 From: rpjday at crashcourse.ca (Robert P. J. Day) Date: Thu, 27 May 2010 14:57:43 -0400 (EDT) Subject: [kw-pm] this list still active? Message-ID: rday -- ======================================================================== Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday ======================================================================== From rpjday at crashcourse.ca Thu May 27 13:10:19 2010 From: rpjday at crashcourse.ca (Robert P. J. Day) Date: Thu, 27 May 2010 16:10:19 -0400 (EDT) Subject: [kw-pm] compatibility between fedora and ubuntu perl packages? Message-ID: i asked about this to some extent on the kwlug-disc list as it was part of a bigger problem but this is specifically a perl issue. i took an rpm package and mangled it (via "alien") into a .deb package and installed it on my ubuntu 10.04 system. wasn't too hard as it was a noarch package consisting mostly of perl. however, the top-level program fails because of this in a lower-level module file: ... use Archive::Tar; use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); ... that second "use" statement fails since (and CMIIW as it's been a while since i've worked with perl) the Zip.pm file on ubuntu is actually here: /usr/lib/perl/5.10.1/IO/Compress/Zip.pm in short, that hard coded "use" referring to Zip.pm is simply going to fail on ubuntu since the perl packaging on ubuntu is not the same as it is on fedora, where you *would* find the Zip.pm file in the "right" place: /usr/lib/perl5/vendor_perl/5.10.0/Archive/Zip.pm obviously(?), this could happen numerous times if someone's written a mass of perl code for one distro -- there's no guarantee that any other distro will have the same general module files in the same place. is this normal? what does one normally do with this, other than just hacking the source until things match? rday -- ======================================================================== Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday ======================================================================== From dada.da at gmail.com Thu May 27 13:38:50 2010 From: dada.da at gmail.com (Daniel Allen) Date: Thu, 27 May 2010 16:38:50 -0400 Subject: [kw-pm] compatibility between fedora and ubuntu perl packages? In-Reply-To: References: Message-ID: Archive::Zip and IO::Compress::Zip are two different modules with different authors. Both have ubuntu packages. It is possible that by default Ubuntu installs one and Fedora the other, but they install in different places in the Perl namespace; you can apt-get install libarchive-zip-perl and your code should find it in the perl path just fine. -Daniel On Thu, May 27, 2010 at 4:10 PM, Robert P. J. Day wrote: > > i asked about this to some extent on the kwlug-disc list as it was > part of a bigger problem but this is specifically a perl issue. i > took an rpm package and mangled it (via "alien") into a .deb package > and installed it on my ubuntu 10.04 system. wasn't too hard as it was > a noarch package consisting mostly of perl. > > however, the top-level program fails because of this in a > lower-level module file: > > ... > use Archive::Tar; > use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); > ... > > that second "use" statement fails since (and CMIIW as it's been a > while since i've worked with perl) the Zip.pm file on ubuntu is > actually here: > > /usr/lib/perl/5.10.1/IO/Compress/Zip.pm > > in short, that hard coded "use" referring to Zip.pm is simply going to > fail on ubuntu since the perl packaging on ubuntu is not the same as > it is on fedora, where you *would* find the Zip.pm file in the "right" > place: > > /usr/lib/perl5/vendor_perl/5.10.0/Archive/Zip.pm > > obviously(?), this could happen numerous times if someone's written a > mass of perl code for one distro -- there's no guarantee that any > other distro will have the same general module files in the same > place. > > is this normal? what does one normally do with this, other than > just hacking the source until things match? > > rday > > -- > > ======================================================================== > Robert P. J. Day Waterloo, Ontario, CANADA > > Linux Consulting, Training and Kernel Pedantry. > > Web page: http://crashcourse.ca > Twitter: http://twitter.com/rpjday > ======================================================================== > _______________________________________________ > kw-pm mailing list > kw-pm at pm.org > http://mail.pm.org/mailman/listinfo/kw-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From rpjday at crashcourse.ca Thu May 27 14:09:03 2010 From: rpjday at crashcourse.ca (Robert P. J. Day) Date: Thu, 27 May 2010 17:09:03 -0400 (EDT) Subject: [kw-pm] compatibility between fedora and ubuntu perl packages? In-Reply-To: References: Message-ID: On Thu, 27 May 2010, Daniel Allen wrote: > Archive::Zip and IO::Compress::Zip are two different modules with > different authors.? Both have ubuntu packages. It is possible that > by default Ubuntu installs one and Fedora the other, but they > install in different places in the Perl namespace; you can apt-get > install libarchive-zip-perl and your code should find it in the perl > path just fine. ah, quite right, thanks very much. i did admit my perl was rusty. rday -- ======================================================================== Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday ======================================================================== From txwikinger at ubuntu.com Thu May 27 14:25:18 2010 From: txwikinger at ubuntu.com (Ralph Janke) Date: Thu, 27 May 2010 17:25:18 -0400 Subject: [kw-pm] compatibility between fedora and ubuntu perl packages? In-Reply-To: References: Message-ID: <201005271725.19442.txwikinger@ubuntu.com> Are you sure that you have installed the necessary packages? AFAIK, alien does not create automatically the right dependencies, and dpkg does not load any dependencies when a package is installed. You would need to make sure that your .deb package has the correct dependencies included and use a package manager to install it, or you have to manually make sure all the dependencies are met before you install the packages. On May 27, 2010 04:38:50 pm Daniel Allen wrote: > Archive::Zip and IO::Compress::Zip are two different modules with different > authors. Both have ubuntu packages. It is possible that by default Ubuntu > installs one and Fedora the other, but they install in different places in > the Perl namespace; you can apt-get install libarchive-zip-perl and your > code should find it in the perl path just fine. > > -Daniel > > On Thu, May 27, 2010 at 4:10 PM, Robert P. J. Day wrote: > > i asked about this to some extent on the kwlug-disc list as it was > > > > part of a bigger problem but this is specifically a perl issue. i > > took an rpm package and mangled it (via "alien") into a .deb package > > and installed it on my ubuntu 10.04 system. wasn't too hard as it was > > a noarch package consisting mostly of perl. > > > > however, the top-level program fails because of this in a > > > > lower-level module file: > > > > ... > > use Archive::Tar; > > use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); > > ... > > > > that second "use" statement fails since (and CMIIW as it's been a > > > > while since i've worked with perl) the Zip.pm file on ubuntu is > > > > actually here: > > /usr/lib/perl/5.10.1/IO/Compress/Zip.pm > > > > in short, that hard coded "use" referring to Zip.pm is simply going to > > fail on ubuntu since the perl packaging on ubuntu is not the same as > > it is on fedora, where you *would* find the Zip.pm file in the "right" > > > > place: > > /usr/lib/perl5/vendor_perl/5.10.0/Archive/Zip.pm > > > > obviously(?), this could happen numerous times if someone's written a > > mass of perl code for one distro -- there's no guarantee that any > > other distro will have the same general module files in the same > > place. > > > > is this normal? what does one normally do with this, other than > > > > just hacking the source until things match? > > > > rday > > > > -- > > > > ======================================================================== > > Robert P. J. Day Waterloo, Ontario, CANADA > > > > Linux Consulting, Training and Kernel Pedantry. > > > > Web page: http://crashcourse.ca > > Twitter: http://twitter.com/rpjday > > ======================================================================== > > _______________________________________________ > > kw-pm mailing list > > kw-pm at pm.org > > http://mail.pm.org/mailman/listinfo/kw-pm From txwikinger at ubuntu.com Thu May 27 14:25:18 2010 From: txwikinger at ubuntu.com (Ralph Janke) Date: Thu, 27 May 2010 17:25:18 -0400 Subject: [kw-pm] compatibility between fedora and ubuntu perl packages? In-Reply-To: References: Message-ID: <201005271725.19442.txwikinger@ubuntu.com> Are you sure that you have installed the necessary packages? AFAIK, alien does not create automatically the right dependencies, and dpkg does not load any dependencies when a package is installed. You would need to make sure that your .deb package has the correct dependencies included and use a package manager to install it, or you have to manually make sure all the dependencies are met before you install the packages. On May 27, 2010 04:38:50 pm Daniel Allen wrote: > Archive::Zip and IO::Compress::Zip are two different modules with different > authors. Both have ubuntu packages. It is possible that by default Ubuntu > installs one and Fedora the other, but they install in different places in > the Perl namespace; you can apt-get install libarchive-zip-perl and your > code should find it in the perl path just fine. > > -Daniel > > On Thu, May 27, 2010 at 4:10 PM, Robert P. J. Day wrote: > > i asked about this to some extent on the kwlug-disc list as it was > > > > part of a bigger problem but this is specifically a perl issue. i > > took an rpm package and mangled it (via "alien") into a .deb package > > and installed it on my ubuntu 10.04 system. wasn't too hard as it was > > a noarch package consisting mostly of perl. > > > > however, the top-level program fails because of this in a > > > > lower-level module file: > > > > ... > > use Archive::Tar; > > use Archive::Zip qw( :ERROR_CODES :CONSTANTS ); > > ... > > > > that second "use" statement fails since (and CMIIW as it's been a > > > > while since i've worked with perl) the Zip.pm file on ubuntu is > > > > actually here: > > /usr/lib/perl/5.10.1/IO/Compress/Zip.pm > > > > in short, that hard coded "use" referring to Zip.pm is simply going to > > fail on ubuntu since the perl packaging on ubuntu is not the same as > > it is on fedora, where you *would* find the Zip.pm file in the "right" > > > > place: > > /usr/lib/perl5/vendor_perl/5.10.0/Archive/Zip.pm > > > > obviously(?), this could happen numerous times if someone's written a > > mass of perl code for one distro -- there's no guarantee that any > > other distro will have the same general module files in the same > > place. > > > > is this normal? what does one normally do with this, other than > > > > just hacking the source until things match? > > > > rday > > > > -- > > > > ======================================================================== > > Robert P. J. Day Waterloo, Ontario, CANADA > > > > Linux Consulting, Training and Kernel Pedantry. > > > > Web page: http://crashcourse.ca > > Twitter: http://twitter.com/rpjday > > ======================================================================== > > _______________________________________________ > > kw-pm mailing list > > kw-pm at pm.org > > http://mail.pm.org/mailman/listinfo/kw-pm From rpjday at crashcourse.ca Thu May 27 14:41:27 2010 From: rpjday at crashcourse.ca (Robert P. J. Day) Date: Thu, 27 May 2010 17:41:27 -0400 (EDT) Subject: [kw-pm] compatibility between fedora and ubuntu perl packages? In-Reply-To: <201005271725.19442.txwikinger@ubuntu.com> References: <201005271725.19442.txwikinger@ubuntu.com> Message-ID: On Thu, 27 May 2010, Ralph Janke wrote: > Are you sure that you have installed the necessary packages? > > AFAIK, alien does not create automatically the right dependencies, > and dpkg does not load any dependencies when a package is installed. > You would need to make sure that your .deb package has the correct > dependencies included and use a package manager to install it, or > you have to manually make sure all the dependencies are met before > you install the packages. give me a bit, i'll summarize my thinking, then you can laugh hysterically at it before correcting it. rday -- ======================================================================== Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday ======================================================================== From rpjday at crashcourse.ca Thu May 27 14:41:27 2010 From: rpjday at crashcourse.ca (Robert P. J. Day) Date: Thu, 27 May 2010 17:41:27 -0400 (EDT) Subject: [kw-pm] compatibility between fedora and ubuntu perl packages? In-Reply-To: <201005271725.19442.txwikinger@ubuntu.com> References: <201005271725.19442.txwikinger@ubuntu.com> Message-ID: On Thu, 27 May 2010, Ralph Janke wrote: > Are you sure that you have installed the necessary packages? > > AFAIK, alien does not create automatically the right dependencies, > and dpkg does not load any dependencies when a package is installed. > You would need to make sure that your .deb package has the correct > dependencies included and use a package manager to install it, or > you have to manually make sure all the dependencies are met before > you install the packages. give me a bit, i'll summarize my thinking, then you can laugh hysterically at it before correcting it. rday -- ======================================================================== Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday ======================================================================== From rpjday at crashcourse.ca Thu May 27 14:55:33 2010 From: rpjday at crashcourse.ca (Robert P. J. Day) Date: Thu, 27 May 2010 17:55:33 -0400 (EDT) Subject: [kw-pm] mangling publican 1.99 to install on ubuntu Message-ID: what the heck, i'll repost this here since it's turning out to be primarily a perl issue and i'd be delighted if someone could verify the right way to do this since i'm going to try to be using it tomorrow. publican is a docbook/xml-based publishing program written by the folks at red hat for their online docs, and they've recently added another package, publican-website, for websites of course. the two "noarch" rpm files are here: http://rlandmann.fedorapeople.org/publican/ i took a chance, downloaded them, and used "alien" to convert them to .deb files. the saving grace here is that, since they're noarch, they're less likely to have incompatibilities. and as for rpm scriptlets incorporated into those packages, the website package had only: postinstall scriptlet (using /bin/sh): /usr/bin/perl -e 'use Publican::WebSite; my $ws = Publican::WebSite->new(); $ws->regen_all_toc();' so, really, given the structure of those rpm packages, my only concerns were dependencies and making sure the perl INC path was set correctly. after installing both .deb files with dpkg, i ran "publican --help" and learned quickly that i needed to: $ export PERL5LIB=/usr/lib/perl5/vendor_perl/5.10.0 ok, try again and, based on daniel's advice, i iteratively learned that i needed to install the ubuntu packages: libarchive-zip-perl libdbi-perl libtemplate-perl based on fairly obvious error messages, of course. and at that point, publican will at least execute. sadly, the packages didn't come bundled with the docs so i'll have to wing it. but if anyone's bored to tears and wants to verify what i did and suggest a better way, feel free. i haven't run that last website scriptlet yet since i have no clue what it does. but i don't need the website functionality anyway. thoughts? rday -- ======================================================================== Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday ======================================================================== From rpjday at crashcourse.ca Mon May 31 06:02:03 2010 From: rpjday at crashcourse.ca (Robert P. J. Day) Date: Mon, 31 May 2010 09:02:03 -0400 (EDT) Subject: [kw-pm] why is my $PWD uninitialized? Message-ID: (aside: i'm suddenly immersed in a bunch of perl code so while my perl is very rusty, i'm going to be asking some admittedly dumb questions over the next little while as i get back to speed.) i'm rewriting a tutorial on the "udev" facility in linux, and it turns out that the source tarball has a "test" component that simulates plugging and unplugging various devices and checking the messages generated against what's expected. very cool. however, when i try to run the script on my ubuntu system: $ sudo test/udev-test.pl Use of uninitialized value $PWD in concatenation (.) or string at test/udev-test.pl line 1735. udev-test will run 142 tests: TEST 1: no rules device '/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda' expecting node/link 'sda' Use of uninitialized value $PWD in concatenation (.) or string at test/udev-test.pl line 1663. Use of uninitialized value $PWD in concatenation (.) or string at test/udev-test.pl line 1663. add: error Can't exec "tree": No such file or directory at test/udev-test.pl line 1685. Use of uninitialized value $PWD in concatenation (.) or string at test/udev-test.pl line 1698. Use of uninitialized value $PWD in concatenation (.) or string at test/udev-test.pl line 1698. remove: ok ... etc etc ... the script udev-test.pl opens with: ... use warnings; use strict; my $PWD = $ENV{PWD}; my $sysfs = "test/sys/"; ... down at line 1735, there is: print CONF "udev_rules=\"$PWD\"\n"; while at line 1663: if ((-e "$PWD/$udev_root$rules->{exp_name}") || (-l "$PWD/$udev_root$rules->{exp_name}")) { i'm baffled -- shouldn't that variable be initialized? or am i just forgetting something hideously basic about my perl? rday -- ======================================================================== Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday ======================================================================== From foxryan at gmail.com Mon May 31 06:06:28 2010 From: foxryan at gmail.com (Ryan Fox) Date: Mon, 31 May 2010 09:06:28 -0400 Subject: [kw-pm] why is my $PWD uninitialized? In-Reply-To: References: Message-ID: Have a look at Cwd. http://perldoc.perl.org/Cwd.html On Mon, May 31, 2010 at 9:02 AM, Robert P. J. Day wrote: > > (aside: i'm suddenly immersed in a bunch of perl code so while my > perl is very rusty, i'm going to be asking some admittedly dumb > questions over the next little while as i get back to speed.) > > i'm rewriting a tutorial on the "udev" facility in linux, and it > turns out that the source tarball has a "test" component that > simulates plugging and unplugging various devices and checking the > messages generated against what's expected. very cool. > > however, when i try to run the script on my ubuntu system: > > $ sudo test/udev-test.pl > Use of uninitialized value $PWD in concatenation (.) or string at test/ > udev-test.pl line 1735. > > udev-test will run 142 tests: > > TEST 1: no rules > device > '/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda' > expecting node/link 'sda' > Use of uninitialized value $PWD in concatenation (.) or string at test/ > udev-test.pl line 1663. > Use of uninitialized value $PWD in concatenation (.) or string at test/ > udev-test.pl line 1663. > add: error > Can't exec "tree": No such file or directory at test/udev-test.pl line > 1685. > > Use of uninitialized value $PWD in concatenation (.) or string at test/ > udev-test.pl line 1698. > Use of uninitialized value $PWD in concatenation (.) or string at test/ > udev-test.pl line 1698. > remove: ok > ... etc etc ... > > the script udev-test.pl opens with: > > ... > use warnings; > use strict; > > my $PWD = $ENV{PWD}; > my $sysfs = "test/sys/"; > ... > > down at line 1735, there is: > > print CONF "udev_rules=\"$PWD\"\n"; > > while at line 1663: > > if ((-e "$PWD/$udev_root$rules->{exp_name}") || > (-l "$PWD/$udev_root$rules->{exp_name}")) { > > i'm baffled -- shouldn't that variable be initialized? or am i just > forgetting something hideously basic about my perl? > > rday > > > -- > > ======================================================================== > Robert P. J. Day Waterloo, Ontario, CANADA > > Linux Consulting, Training and Kernel Pedantry. > > Web page: http://crashcourse.ca > Twitter: http://twitter.com/rpjday > ======================================================================== > _______________________________________________ > kw-pm mailing list > kw-pm at pm.org > http://mail.pm.org/mailman/listinfo/kw-pm > -------------- next part -------------- An HTML attachment was scrubbed... URL: From elbie at trig.net Mon May 31 06:14:10 2010 From: elbie at trig.net (Christopher Calzonetti) Date: Mon, 31 May 2010 09:14:10 -0400 Subject: [kw-pm] why is my $PWD uninitialized? In-Reply-To: References: Message-ID: <20100531131410.GA54680@trig.net> On Mon, May 31, 2010 at 09:02:03AM -0400, Robert P. J. Day wrote: > > $ sudo test/udev-test.pl > Use of uninitialized value $PWD in concatenation (.) or string at test/udev-test.pl line 1735. shikamaru:~ elbie$ perl -e 'print "\"$ENV{PWD}\"", "\n";' "/Users/elbie" shikamaru:~ elbie$ sudo perl -e 'print "\"$ENV{PWD}\"", "\n";' "" Sudo by default calls a reset of the environment. See the man page for more information. -- Christopher Calzonetti, Technical Lead, Trig.Net Web: http://www.trig.net/ Mail: mailto:chris at trig.net From rpjday at crashcourse.ca Mon May 31 06:37:21 2010 From: rpjday at crashcourse.ca (Robert P. J. Day) Date: Mon, 31 May 2010 09:37:21 -0400 (EDT) Subject: [kw-pm] why is my $PWD uninitialized? In-Reply-To: <20100531131410.GA54680@trig.net> References: <20100531131410.GA54680@trig.net> Message-ID: On Mon, 31 May 2010, Christopher Calzonetti wrote: > On Mon, May 31, 2010 at 09:02:03AM -0400, Robert P. J. Day wrote: > > > > $ sudo test/udev-test.pl > > Use of uninitialized value $PWD in concatenation (.) or string at test/udev-test.pl line 1735. > > shikamaru:~ elbie$ perl -e 'print "\"$ENV{PWD}\"", "\n";' > "/Users/elbie" > shikamaru:~ elbie$ sudo perl -e 'print "\"$ENV{PWD}\"", "\n";' > "" > > Sudo by default calls a reset of the environment. See the man page for > more information. yes, that will explain it. i'm embarrassed -- i really should have known that, shouldn't i? i might write a short wiki page on this and let you folks play with it if it interests you. i think the source needs to be tweaked to get around some obvious glitches. more later... rday -- ======================================================================== Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday ======================================================================== From rpjday at crashcourse.ca Mon May 31 09:37:19 2010 From: rpjday at crashcourse.ca (Robert P. J. Day) Date: Mon, 31 May 2010 12:37:19 -0400 (EDT) Subject: [kw-pm] playing with udev: the followup Message-ID: since folks here were nice enough to help me out, here's the end result of my writeup which i might use as the basis of another column at linux.com: http://www.crashcourse.ca/wiki/index.php/Building_and_testing_udev my only issue that i'm tempted to submit a patch for involves this code in the test/udev-test.pl script: if ($rules->{exp_add_error}) { print " as expected\n"; } else { print "\n"; system("tree $udev_root"); print "\n"; $error++; sleep(1); } all well and good, except if the user doesn't have the "tree" package installed and something goes wrong, there's no system "tree" command and that invocation of system() fails rather inelegantly. what would be the un-perl-like one correct way to handle cases like that? as in, don't run a command unless you know it's there, perhaps replace it with an invocation of "ls -lR" or something. is there a canonical perl way to do checks like that? thanks. rday -- ======================================================================== Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday ======================================================================== From rpjday at crashcourse.ca Mon May 31 23:52:47 2010 From: rpjday at crashcourse.ca (Robert P. J. Day) Date: Tue, 1 Jun 2010 02:52:47 -0400 (EDT) Subject: [kw-pm] how to quickly list package dependencies based on needed modules? Message-ID: moving on to the next question -- i've downloaded and am building a package whose Build.PL script clearly spells out its build and run requirements: my $builder = $class->new( module_name => 'Publican', dist_name => 'Publican', license => 'perl', dist_author => 'Jeff Fearn ', dist_version_from => 'bin/publican', build_requires => { 'Devel::Cover' => 0, 'Module::Build' => 0, 'Test::Exception' => 0, 'Test::More' => 0, ... snip ... }, requires => { 'Archive::Tar' => 0, 'Archive::Zip' => 0, 'Carp' => 0, ... snip ... } as it stands, when i first went to build this on my ubuntu 10.04 system, i tediously went through the cycle of trying to build, being told what module was missing, identifying the corresponding package, installing, rinse and repeat. is there an automated way to mapping perl modules to their debian/ubuntu packages so that one could just, on the very first build, have the build script say, "hey, you're missing all of these modules, i know what packages they come from, would you like me to install them?" rday -- ======================================================================== Robert P. J. Day Waterloo, Ontario, CANADA Linux Consulting, Training and Kernel Pedantry. Web page: http://crashcourse.ca Twitter: http://twitter.com/rpjday ========================================================================