| phroggy | what exactly do you not want to change? |
| blarney | phroggy: it's OK, I have a solution that works for me phroggy: "BEGIN { unless (eval "use Bazz::Foobar") { #warn "couldn't load Bazz::Foobar, try Foobar: $@"; use Foobar; } }" phroggy: better "BEGIN { unless (eval "use Bazz::Foobar") { use Foobar; } }" |
| phroggy | but isn't Bazz::Foobar buggy? I'm pretty sure that won't work the way you expect; you need to use "require" instead of "use" |
| blarney | phroggy: well, actually for people who have the system version setup have already overwritten the system one with the corrected version, so there's really only 2 cases phroggy: seemed to work ok for me |
| phroggy | blarney: I'm not sure the "use" will happen when you think it will. I'm not entirely sure though. I don't really know what happens when you call "use" inside a BEGIN block. |
| blarney | phroggy: there's an example at: http://www.unix.org.ua/orelly/perl/cookbook/ch12_03.htm |
| phroggy | um, no there isn't. |
| BinGOs | blarney: the pasting of links to warez sites is not appreciated. |
| Jmax- | Ukraine-- |
| blarney | BinGOs: I did not know it was, actually I thought it was an Australian unix user group when I first looked at, sorry 'bout that |
| overrider | ugh, you should get canned for that |
| blarney | .ua vs .au ;) it was just a random Google hit |
| somian | Yo yodleyou, BinGOs , howzzit |
| action | CPAN upload: Makefile-Parser-0.17 by AGENT |
| CPAN | upload: Makefile-Parser-0.17 by AGENT |
| blarney | phroggy: yep, you're right "require" works, but "use" will load both packages twice if they are present |
| phroggy | I'm fairly confident that "use" is a bad idea. (in this particular situation, I mean) (when you're trying to do it conditionally) |
| blarney | phroggy: it loads them twice, presumably because "use" statements are scanned at compile-time |
| phroggy | that's what I would expect, yes. |
| blarney | phroggy: and that's what happens |
| phroggy | the second "use" happens at compile time regardless of the condition, then the first one (inside the eval block) happens later |
| blarney | phroggy: right on a totally different subject, is there a way with Build.PL to prevent the download of modules via CPAN? |
| phroggy | huh? |
| action | somian continues to hide in #rxvt-unicode |
| somian | continues to hide in #rxvt-unicode |
| blarney | phroggy: I'm building a package for Fedora which must not do any downloads (i.e. it should build locally) |
| rhizo | blarney: read perldoc Module::Build::Cookbook |
| blarney | rhizo: I did so, but I didn't see an option for that, somebody on #fedora-devel said that he thought there was one |
| |rellis| | I'm trying to write a simple script to verify a user/password against local unix password database. i was looking at using getpwent but i was wondering if there's an easier way? |
| phroggy | |rellis|: nope, although you can use getpwnam instead of getpwent |
| action | CPAN upload: Test-TAP-HTMLMatrix-0.08 by GAAL |
| CPAN | upload: Test-TAP-HTMLMatrix-0.08 by GAAL |
| phroggy | you need root access, and you'll have to call crypt() yourself. |