From john at perlwolf.com Mon Jun 1 09:54:05 2009 From: john at perlwolf.com (John Macdonald) Date: Mon, 1 Jun 2009 12:54:05 -0400 Subject: [tpm] Is there a three-way version of... In-Reply-To: References: <4A20263E.4030102@alteeve.com> <4A203700.80906@alteeve.com> <45535519-7D9D-42CA-8EE7-98CC75B7DB40@stok.ca> <4A2042CA.1030909@alteeve.com> <6A5D7C88-A25B-49F5-A0C1-3DEAEDB87FC1@stok.ca> <20090529204356.GD4363@perlwolf.com> Message-ID: <20090601165404.GE4363@perlwolf.com> On Sat, May 30, 2009 at 02:54:13AM -0400, J. Bobby Lopez wrote: > It basically looks like we're talking about switch statements. An alternate > method of doing the same thing would be as follows, though I'm not sure how > expensive it is: > > $a = ""; > $a = $b if $a = ""; > $a = $c if $a = ""; > $a = $d if $a = ""; > ... > $a = "default" if $a = ""; This has a different meaning - you're testing for empty string while // tests for undefined. The empty string is a defined value. If would happen in my example below if the command line had an arg of --foo= instead of --foo=0. As far as expensive, consider how your version would read if, instead of $a, you were setting a value nested deep in a hash. The direct change to your form would be: $my{$first}{$second}{option} = undef; $my{$first}{$second}{option} = $b unless defined $my{$first}{$second}{option}; $my{$first}{$second}{option} = $c unless defined $my{$first}{$second}{option}; $my{$first}{$second}{option} = $d unless defined $my{$first}{$second}{option}; $my{$first}{$second}{option} = 'default' unless defined $my{$first}{$second}{option}; Using a temporary alias into the structure (as Uri suggests in another message) that gets shorter: my $alias = \$my{$first}{$second}{option}; $alias = undef; $alias = $b unless defined $alias; $alias = $c unless defined $alias; $alias = $d unless defined $alias; $alias = 'default' unless defined $alias; But that's still a lot messier, harder to read, and more expensive to execute than: $my{$first}{$second}{option} = $b // $c // $d // 'default'; > On Fri, May 29, 2009 at 4:43 PM, John Macdonald wrote: > > > On Fri, May 29, 2009 at 04:20:48PM -0400, Mike Stok wrote: > > > As of perl 5.10 (I think) it is the "defined or" operator which only > > > returns the right hand side if the left hand side is undef, from perlop: > > > > > > C?style Logical Defined?Or > > > > > > Although it has no direct equivalent in C, Perl?s "//" operator is > > > related to its C?style or. In fact, it?s exactly the same as > > > "||", > > > except that it tests the left hand side?s definedness instead of > > > its > > > truth. Thus, "$a // $b" is similar to "defined($a) || $b" (except > > > that > > > it returns the value of $a rather than the value of > > > "defined($a)") and > > > is exactly equivalent to "defined($a) ? $a : $b". This is very > > > useful > > > for providing default values for variables. If you actually want > > > to > > > test if at least one of $a and $b is defined, use "defined($a // > > > $b)". > > > > > > The "||", "//" and "&&" operators return the last value evaluated > > > (unlike C?s "||" and "&&", which return 0 or 1). > > > > This is especially useful for setting a value that can come from > > multiple optional locations, and using the first one that was > > actually provided: > > > > $foo = $opt{foo} || $ENV{PROG_FOO} || $rc_opts{foo} || 'default'; > > > > and, as Mike said, this will still take the first one found even > > if the explicitly provided value is 0 or ''. e.g.: > > > > prog --foo=0 > > > > The || operator would skip this setting (because it's false) and > > go on to getting the setting of foo from the alternate sources. > > _______________________________________________ > > toronto-pm mailing list > > toronto-pm at pm.org > > http://mail.pm.org/mailman/listinfo/toronto-pm > > > > > > -- > J. Bobby Lopez > Web: http://jbldata.com/ > Twitter: http://www.twitter.com/jbobbylopez From john at perlwolf.com Mon Jun 1 10:02:45 2009 From: john at perlwolf.com (John Macdonald) Date: Mon, 1 Jun 2009 13:02:45 -0400 Subject: [tpm] Is there a three-way version of... In-Reply-To: <982579710905301130t5d45aaa4v71a964f0c62b3f81@mail.gmail.com> References: <4A20263E.4030102@alteeve.com> <4A203700.80906@alteeve.com> <45535519-7D9D-42CA-8EE7-98CC75B7DB40@stok.ca> <4A2042CA.1030909@alteeve.com> <6A5D7C88-A25B-49F5-A0C1-3DEAEDB87FC1@stok.ca> <20090529204356.GD4363@perlwolf.com> <982579710905301130t5d45aaa4v71a964f0c62b3f81@mail.gmail.com> Message-ID: <20090601170245.GF4363@perlwolf.com> On Sat, May 30, 2009 at 02:30:37PM -0400, Shaun Fryer wrote: > >> ? ? ? ?The "||", "//" and "&&" operators return the last value evaluated > >> ? ? ? ?(unlike C?s "||" and "&&", which return 0 or 1). > > > ? ?$foo = $opt{foo} || $ENV{PROG_FOO} || $rc_opts{foo} || 'default'; > > This is interesting. I learned something new. Now I'm personally > curious if there's an operator that instead of doing "or equals", does > "equals or". For instance, I find myself doing this alot (particularly > in accessors/setters)... > > $x = $y if defined $y; > > What would be helpful is to be able to do this instead. > > $x =|| $y; > > Or even better... > > $x =// $y; Not in perl5. Perl6 has a meta-operator R which turns the following binary operator to take its operands in reverse order. So: $a R- $b $b - $a produce the same result. You can use this, for example, to provide Rcmp to sort to get a reversed order string sort. Perl6 has a number of things that deal with operators (the way sort takes an operator as an argument), so the Rop is useful in many of these functional composition uses. I've pretty sure that this is still valid for assignment operators, so just as: $x //= $y; is the same as: $x = $x // $y; but without computing $x twice, you also get: $x R//= $y; to mean: $x = $x R// $y; # i.e. $x = $y // $x; but again, without rewriting or recomputing $x. From john at perlwolf.com Mon Jun 1 10:09:20 2009 From: john at perlwolf.com (John Macdonald) Date: Mon, 1 Jun 2009 13:09:20 -0400 Subject: [tpm] Is there a three-way version of... In-Reply-To: <982579710905301420r3b06e833x5b4336e9558a67a7@mail.gmail.com> References: <45535519-7D9D-42CA-8EE7-98CC75B7DB40@stok.ca> <4A2042CA.1030909@alteeve.com> <6A5D7C88-A25B-49F5-A0C1-3DEAEDB87FC1@stok.ca> <20090529204356.GD4363@perlwolf.com> <982579710905301130t5d45aaa4v71a964f0c62b3f81@mail.gmail.com> <87bppajsoo.fsf@quad.sysarch.com> <982579710905301249u5fe355e5x16c8650e9f6dbb44@mail.gmail.com> <87tz32ib9g.fsf@quad.sysarch.com> <982579710905301420r3b06e833x5b4336e9558a67a7@mail.gmail.com> Message-ID: <20090601170920.GG4363@perlwolf.com> On Sat, May 30, 2009 at 05:20:56PM -0400, Shaun Fryer wrote: > > i generally don't like using shift on @_ and prefer to assign it. > > True for complex stuff. My feeling is that when it's a very short > method (one liner), like a simple accessor, shift is faster (from > benchmarks I've seen) and not unclear/unmaintainable. For instance... > > sub foo { return shift()->{foo} = shift if @_ } > > ...seems quite reasonable to me. YMMV > > > never duplicate deep access code. use a temp var with the lower level > > reference and it will be clearer and if you do need multiple uses, faster. > > Seems reasonable. > > > ...in the bizarre case of someone setting $] which changes the index origin, > > @array will stay the same but $#array will change. > > Good point. > > Thanks for the input. I tend to use $self = shift in methods - that leaves @_ looking the same way os the list of arguments specified in the method call. I'll also use $var = shift if there is only one arg and I don't expect there to ever be a second arg. (I won't convert to this form, though, if a refactoring reduces the arg count down to 1.) From jbl at jbldata.com Mon Jun 1 22:12:22 2009 From: jbl at jbldata.com (J. Bobby Lopez) Date: Tue, 2 Jun 2009 01:12:22 -0400 Subject: [tpm] Is there a three-way version of... In-Reply-To: <20090601170920.GG4363@perlwolf.com> References: <4A2042CA.1030909@alteeve.com> <6A5D7C88-A25B-49F5-A0C1-3DEAEDB87FC1@stok.ca> <20090529204356.GD4363@perlwolf.com> <982579710905301130t5d45aaa4v71a964f0c62b3f81@mail.gmail.com> <87bppajsoo.fsf@quad.sysarch.com> <982579710905301249u5fe355e5x16c8650e9f6dbb44@mail.gmail.com> <87tz32ib9g.fsf@quad.sysarch.com> <982579710905301420r3b06e833x5b4336e9558a67a7@mail.gmail.com> <20090601170920.GG4363@perlwolf.com> Message-ID: Yep, chaining is faster, which makes sense. But figured I'd try to compare them anyway. Here are two scripts that I used for comparison: test1.pl-------------------------------------------------------------- #!/usr/bin/perl -w use strict; sub loop { my ($a, $b, $c, $d) = ""; for my $i (0..300000) { $a = get(0); $b = get(5); $c = get(10); $d = get(14); $a = $b if $a eq "-"; $a = $c if $a eq "-"; $a = $d if $a eq "-"; $a = "empty" if $a eq "-"; #print "$i - a: $a, b: $b, c: $c, d: $d", "\n"; } } sub get { my $r = 4; my ($m) = @_; my $a = int(rand($r)) + $m; return $a if $a > ($m + $r) - 2; return "-"; } -------------------------------------------------------------- test2.pl-------------------------------------------------------------- #!/usr/bin/perl -w use strict; sub loop { my ($a, $b, $c, $d) = ""; for my $i (0..300000) { $a = get(0); $b = get(5); $c = get(10); $d = get(14); $a = $a || $b || $c || $d || 'empty'; # print "$i - a: $a, b: $b, c: $c, d: $d", "\n"; } } sub get { my $r = 4; my ($m) = @_; my $a = int(rand($r)) + $m; return $a if $a > ($m + $r) - 2; return 0; } loop(); -------------------------------------------------------------- Here are the results from the tests ran on the above scripts: test1.pl jbl at blopez-d620:~/tmp$ time ./test1.pl real 0m2.129s user 0m2.120s sys 0m0.008s jbl at blopez-d620:~/tmp$ time ./test1.pl real 0m2.023s user 0m2.016s sys 0m0.004s jbl at blopez-d620:~/tmp$ time ./test1.pl real 0m1.983s user 0m1.976s sys 0m0.008s test2.pl jbl at blopez-d620:~/tmp$ time ./test2.pl real 0m1.612s user 0m1.604s sys 0m0.008s jbl at blopez-d620:~/tmp$ time ./test2.pl real 0m1.579s user 0m1.576s sys 0m0.004s jbl at blopez-d620:~/tmp$ time ./test2.pl real 0m1.625s user 0m1.612s sys 0m0.012s -- J. Bobby Lopez Web: http://jbldata.com/ Twitter: http://www.twitter.com/jbobbylopez -------------- next part -------------- An HTML attachment was scrubbed... URL: From uri at StemSystems.com Mon Jun 1 22:48:59 2009 From: uri at StemSystems.com (Uri Guttman) Date: Tue, 02 Jun 2009 01:48:59 -0400 Subject: [tpm] Is there a three-way version of... In-Reply-To: (J. Bobby Lopez's message of "Tue\, 2 Jun 2009 01\:12\:22 -0400") References: <4A2042CA.1030909@alteeve.com> <6A5D7C88-A25B-49F5-A0C1-3DEAEDB87FC1@stok.ca> <20090529204356.GD4363@perlwolf.com> <982579710905301130t5d45aaa4v71a964f0c62b3f81@mail.gmail.com> <87bppajsoo.fsf@quad.sysarch.com> <982579710905301249u5fe355e5x16c8650e9f6dbb44@mail.gmail.com> <87tz32ib9g.fsf@quad.sysarch.com> <982579710905301420r3b06e833x5b4336e9558a67a7@mail.gmail.com> <20090601170920.GG4363@perlwolf.com> Message-ID: <87bpp75gok.fsf@quad.sysarch.com> use Benchmark ; running your own loops with the external command time is very inaccurate and clumsy. perl's benchmark module handles various issues such as subtracting out a null call, running all the variations for a fixed wall clock time or count, and various comparison reports. plus it is much simpler to use and setup than your code. learn to use it as it will make doing benchmarks so much easier and you will get more useful information out of them. uri -- Uri Guttman ------ uri at stemsystems.com -------- http://www.sysarch.com -- ----- Perl Code Review , Architecture, Development, Training, Support ------ --------- Free Perl Training --- http://perlhunter.com/college.html --------- --------- Gourmet Hot Cocoa Mix ---- http://bestfriendscocoa.com --------- From ilia at nurey.com Tue Jun 2 15:54:24 2009 From: ilia at nurey.com (Ilia Lobsanov) Date: Tue, 2 Jun 2009 18:54:24 -0400 Subject: [tpm] Let's go to YAPC!! Message-ID: So I think I decided to drive my Subaru to YAPC. Anybody looking for a ride? And can drive manual part of the way? I can fit 3 people. ilia. From olaf at vilerichard.com Tue Jun 2 16:15:16 2009 From: olaf at vilerichard.com (Olaf Alders) Date: Tue, 2 Jun 2009 19:15:16 -0400 Subject: [tpm] Let's go to YAPC!! In-Reply-To: References: Message-ID: Mark and I (and maybe Adam?) are still looking to figure out our rides. I scoff at automatic transmissions! When were you thinking of leaving and returning? Olaf On 2-Jun-09, at 6:54 PM, Ilia Lobsanov wrote: > So I think I decided to drive my Subaru to YAPC. Anybody looking for a > ride? And can drive manual part of the way? I can fit 3 people. > > ilia. > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm > -- Olaf Alders olaf at vilerichard.com http://www.vilerichard.com -- folk rock http://cdbaby.com/cd/vilerichard From samogon at gmail.com Tue Jun 2 16:38:40 2009 From: samogon at gmail.com (Ilia) Date: Tue, 2 Jun 2009 19:38:40 -0400 Subject: [tpm] Let's go to YAPC!! In-Reply-To: References: Message-ID: I would like to leave Sunday June 21 and return Wednesday night or Thursday morning. ilia. On Tue, Jun 2, 2009 at 7:15 PM, Olaf Alders wrote: > Mark and I (and maybe Adam?) are still looking to figure out our rides. ?I > scoff at automatic transmissions! ?When were you thinking of leaving and > returning? > > Olaf > > On 2-Jun-09, at 6:54 PM, Ilia Lobsanov wrote: > >> So I think I decided to drive my Subaru to YAPC. Anybody looking for a >> ride? And can drive manual part of the way? I can fit 3 people. >> >> ilia. >> _______________________________________________ >> toronto-pm mailing list >> toronto-pm at pm.org >> http://mail.pm.org/mailman/listinfo/toronto-pm >> > > -- > Olaf Alders > olaf at vilerichard.com > > http://www.vilerichard.com -- folk rock > http://cdbaby.com/cd/vilerichard > > > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm > -- Ilia Lobsanov Nurey Networks - http://www.nurey.com New Ideas for a New Economy Python, Perl, Java, Linux & more Toronto +1 647 996 9087 Boston +1 781 328 1162 From olaf at vilerichard.com Tue Jun 2 16:46:22 2009 From: olaf at vilerichard.com (Olaf Alders) Date: Tue, 2 Jun 2009 19:46:22 -0400 Subject: [tpm] Let's go to YAPC!! In-Reply-To: References: Message-ID: <643935DD-12A4-49BC-A4ED-4CE039E896A1@vilerichard.com> Sunday - Weds is what Mark and I were aiming for, so that would work for us. Olaf On 2-Jun-09, at 7:38 PM, Ilia wrote: > I would like to leave Sunday June 21 and return Wednesday night or > Thursday morning. > > ilia. > > On Tue, Jun 2, 2009 at 7:15 PM, Olaf Alders > wrote: >> Mark and I (and maybe Adam?) are still looking to figure out our >> rides. I >> scoff at automatic transmissions! When were you thinking of >> leaving and >> returning? >> >> Olaf >> >> On 2-Jun-09, at 6:54 PM, Ilia Lobsanov wrote: >> >>> So I think I decided to drive my Subaru to YAPC. Anybody looking >>> for a >>> ride? And can drive manual part of the way? I can fit 3 people. >>> >>> ilia. >>> _______________________________________________ >>> toronto-pm mailing list >>> toronto-pm at pm.org >>> http://mail.pm.org/mailman/listinfo/toronto-pm >>> >> >> -- >> Olaf Alders >> olaf at vilerichard.com >> >> http://www.vilerichard.com -- folk rock >> http://cdbaby.com/cd/vilerichard >> >> >> _______________________________________________ >> toronto-pm mailing list >> toronto-pm at pm.org >> http://mail.pm.org/mailman/listinfo/toronto-pm >> > > > > -- > Ilia Lobsanov > Nurey Networks - http://www.nurey.com > New Ideas for a New Economy > Python, Perl, Java, Linux & more > Toronto +1 647 996 9087 > Boston +1 781 328 1162 > -- Olaf Alders olaf at vilerichard.com http://www.vilerichard.com -- folk rock http://cdbaby.com/cd/vilerichard From arocker at vex.net Wed Jun 3 16:09:09 2009 From: arocker at vex.net (arocker at vex.net) Date: Wed, 3 Jun 2009 19:09:09 -0400 (EDT) Subject: [tpm] Let's go to YAPC!! In-Reply-To: References: Message-ID: <244004bec936990fa1ff80d5ea47a154.squirrel@webmail.vex.net> > I would like to leave Sunday June 21 and return Wednesday night or > Thursday morning. > I'm going down for the Parrot Workshop, which means going on Friday 19th. I can do that by bus, but the return overnight bus trip is fairly gruesome. Would you have a spare seat for the return trip? From ilia at nurey.com Mon Jun 8 12:21:39 2009 From: ilia at nurey.com (Ilia Lobsanov) Date: Mon, 8 Jun 2009 15:21:39 -0400 Subject: [tpm] my video coverage of RubyJobFair Message-ID: condensed to 10 minutes - http://www.youtube.com/watch?v=kmWe2FhoIjg -- Ilia Lobsanov Nurey Networks - http://www.nurey.com New Ideas for a New Economy Python, Perl, Java, Linux & more Toronto +1 647 996 9087 Boston +1 781 328 1162 From arocker at vex.net Sat Jun 13 12:11:29 2009 From: arocker at vex.net (arocker at vex.net) Date: Sat, 13 Jun 2009 15:11:29 -0400 (EDT) Subject: [tpm] June and July meetings Message-ID: Nobody's offered to speak or organise June 25, and I can't guarantee to be back for the evening. Therefore, unless someone steps forward, I propose to declare the meeting cancelled. I will also be away for July 29. We have that down as "YAPC debriefing", so one or more YAPC attenders will be needed to talk about their experiences, and somebody will have to be in charge, (which isn't very onerous). Can we have some volunteers, please? From arocker at vex.net Mon Jun 15 11:12:18 2009 From: arocker at vex.net (arocker at vex.net) Date: Mon, 15 Jun 2009 14:12:18 -0400 (EDT) Subject: [tpm] July meeting Message-ID: <943bdfb6aee8460796d7898609d8331e.squirrel@webmail.vex.net> We have a volunteer to run the meeting, but really need someone who can get to the location a little earlier (18:00 or better, 17:30) to let people in. Could anybody manage that? From rdice at pobox.com Fri Jun 19 08:35:41 2009 From: rdice at pobox.com (Richard Dice) Date: Fri, 19 Jun 2009 11:35:41 -0400 Subject: [tpm] Damian Conway event, Monday 27 July 2009 Message-ID: <5bef4baf0906190835p7b850568m4b92ee33a307481f@mail.gmail.com> Hi everyone, Damian Conway, Perl hacker extraordinaire and friend and honorary TPM member, will be in Toronto in July. He has offered to present a talk the evening of Monday 27 July. (Probably we could consider this to be our July meeting topic?) Details on the talk and its location are to follow as I hash that stuff out. Just wanted to let people know so they could save the date. Cheers, - Richard -------------- next part -------------- An HTML attachment was scrubbed... URL: From abram.hindle at softwareprocess.us Sat Jun 20 17:49:09 2009 From: abram.hindle at softwareprocess.us (Abram Hindle) Date: Sat, 20 Jun 2009 20:49:09 -0400 Subject: [tpm] What's on for the June meeting? Message-ID: <4A3D8385.5030401@softwareprocess.us> What's on for the June meeting? I assume the June meeting is on Thursday the June 25th. abram -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 260 bytes Desc: OpenPGP digital signature URL: From fulko.hew at gmail.com Sun Jun 21 06:15:52 2009 From: fulko.hew at gmail.com (Fulko Hew) Date: Sun, 21 Jun 2009 09:15:52 -0400 Subject: [tpm] What's on for the June meeting? In-Reply-To: <4A3D8385.5030401@softwareprocess.us> References: <4A3D8385.5030401@softwareprocess.us> Message-ID: <8204a4fe0906210615x71485558p7e4310ddb5ab5d68@mail.gmail.com> On Sat, Jun 20, 2009 at 8:49 PM, Abram Hindle < abram.hindle at softwareprocess.us> wrote: > What's on for the June meeting? I assume the June meeting is on Thursday > the June 25th. Due to its closeness to YAPC which causes a drop in TPM attendance, June's meeting is (typically) cancelled. -------------- next part -------------- An HTML attachment was scrubbed... URL: From quantum.mechanic.1964 at gmail.com Tue Jun 23 09:21:06 2009 From: quantum.mechanic.1964 at gmail.com (Quantum Mechanic) Date: Tue, 23 Jun 2009 12:21:06 -0400 Subject: [tpm] CPAN Recursive Dependencies Message-ID: <77f3972e0906230921p74c4c694k40a7b9bfa4ec5096@mail.gmail.com> I've been having some module troubles, and thought I'd start fresh, cleaning out the .cpan directory, etc. I don't have control over the system Perl, so I install modules I need in my own space (~/perl/lib, etc.). Note, I haven't removed installed modules, just the ~/.cpan directory, and started over. (Maybe I should clean out all my installed modules too? But DBM::Deep was a pain.) % perl -MCPAN -eshell cpan > install Bundle::CPAN ...yada yada yada... Recursive dependency detected: Bundle::CPAN => Test::Harness => A/AN/ANDYA/Test-Harness-3.17.tar.gz => File::Spec => S/SM/SMUELLER/PathTools-3.30.tar.gz => Scalar::Util => G/GB/GBARR/Scalar-List-Utils-1.21.tar.gz => Test::More => M/MS/MSCHWERN/Test-Simple-0.88.tar.gz => Test::Harness. Cannot continue. Um, geez, how do I fix this? Or should I abandon this path altogether? Maybe someone can give me some good advice on how to start clean and get it to work the first time? -- -QM Quantum Mechanics: The dreams stuff is made of -------------- next part -------------- An HTML attachment was scrubbed... URL: From fulko.hew at gmail.com Tue Jun 23 09:32:10 2009 From: fulko.hew at gmail.com (Fulko Hew) Date: Tue, 23 Jun 2009 12:32:10 -0400 Subject: [tpm] CPAN Recursive Dependencies In-Reply-To: <77f3972e0906230921p74c4c694k40a7b9bfa4ec5096@mail.gmail.com> References: <77f3972e0906230921p74c4c694k40a7b9bfa4ec5096@mail.gmail.com> Message-ID: <8204a4fe0906230932v1212d455t9734db1831ed4d87@mail.gmail.com> On Tue, Jun 23, 2009 at 12:21 PM, Quantum Mechanic < quantum.mechanic.1964 at gmail.com> wrote: ... snip ... Recursive dependency detected: > Bundle::CPAN > => Test::Harness > => A/AN/ANDYA/Test-Harness-3.17.tar.gz > => File::Spec > => S/SM/SMUELLER/PathTools-3.30.tar.gz > => Scalar::Util > => G/GB/GBARR/Scalar-List-Utils-1.21.tar.gz > => Test::More > => M/MS/MSCHWERN/Test-Simple-0.88.tar.gz > => Test::Harness. > Cannot continue. > > Um, geez, how do I fix this? > I can't say for sure, but someone once suggested to me (on a similar?) problem I was having... - Manually install the offending module (Test::Harness) and then re-try installing your original goal. -------------- next part -------------- An HTML attachment was scrubbed... URL: From quantum.mechanic.1964 at gmail.com Tue Jun 23 10:19:01 2009 From: quantum.mechanic.1964 at gmail.com (Quantum Mechanic) Date: Tue, 23 Jun 2009 13:19:01 -0400 Subject: [tpm] CPAN Recursive Dependencies In-Reply-To: <8204a4fe0906230932v1212d455t9734db1831ed4d87@mail.gmail.com> References: <77f3972e0906230921p74c4c694k40a7b9bfa4ec5096@mail.gmail.com> <8204a4fe0906230932v1212d455t9734db1831ed4d87@mail.gmail.com> Message-ID: <77f3972e0906231019r4d2285d7h1b2e57f1446733aa@mail.gmail.com> On Tue, Jun 23, 2009 at 12:32 PM, Fulko Hew wrote: > > > On Tue, Jun 23, 2009 at 12:21 PM, Quantum Mechanic < > quantum.mechanic.1964 at gmail.com> wrote: > ... snip ... > > Recursive dependency detected: >> Bundle::CPAN >> => Test::Harness >> => A/AN/ANDYA/Test-Harness-3.17.tar.gz >> => File::Spec >> => S/SM/SMUELLER/PathTools-3.30.tar.gz >> => Scalar::Util >> => G/GB/GBARR/Scalar-List-Utils-1.21.tar.gz >> => Test::More >> => M/MS/MSCHWERN/Test-Simple-0.88.tar.gz >> => Test::Harness. >> Cannot continue. >> >> Um, geez, how do I fix this? >> > > > I can't say for sure, but someone once suggested to me (on a similar?) > problem I was having... > > - Manually install the offending module (Test::Harness) and then re-try > installing your original goal. > > > OK, trying that now. Is the bootstrapping *ever* supposed to work automagically? If not, shouldn't CPAN.pm etc. figure out how to break the cycle? I understand in general this can be a hard problem, but it irks me that CPAN can't update itself without help (especially given the big hint of "Try install Bundle::CPAN" everytime I install something else and CPAN is behind -- which, come to think of it, is always behind because it can't update itself.) -- -QM Quantum Mechanics: The dreams stuff is made of -------------- next part -------------- An HTML attachment was scrubbed... URL: From quantum.mechanic.1964 at gmail.com Tue Jun 23 10:31:14 2009 From: quantum.mechanic.1964 at gmail.com (Quantum Mechanic) Date: Tue, 23 Jun 2009 13:31:14 -0400 Subject: [tpm] CPAN Recursive Dependencies In-Reply-To: <8204a4fe0906230932v1212d455t9734db1831ed4d87@mail.gmail.com> References: <77f3972e0906230921p74c4c694k40a7b9bfa4ec5096@mail.gmail.com> <8204a4fe0906230932v1212d455t9734db1831ed4d87@mail.gmail.com> Message-ID: <77f3972e0906231031o320bb087rc8a6239deeaf70d8@mail.gmail.com> On Tue, Jun 23, 2009 at 12:32 PM, Fulko Hew wrote: > > > On Tue, Jun 23, 2009 at 12:21 PM, Quantum Mechanic < > quantum.mechanic.1964 at gmail.com> wrote: > ... snip ... > > Recursive dependency detected: >> Bundle::CPAN >> => Test::Harness >> => A/AN/ANDYA/Test-Harness-3.17.tar.gz >> => File::Spec >> => S/SM/SMUELLER/PathTools-3.30.tar.gz >> => Scalar::Util >> => G/GB/GBARR/Scalar-List-Utils-1.21.tar.gz >> => Test::More >> => M/MS/MSCHWERN/Test-Simple-0.88.tar.gz >> => Test::Harness. >> Cannot continue. >> >> Um, geez, how do I fix this? >> > > > I can't say for sure, but someone once suggested to me (on a similar?) > problem I was having... > > - Manually install the offending module (Test::Harness) and then re-try > installing your original goal. > > > OK, that gave me the same end result, recursive dependency. -- -QM Quantum Mechanics: The dreams stuff is made of -------------- next part -------------- An HTML attachment was scrubbed... URL: From mfowle at navicominc.com Tue Jun 23 10:41:28 2009 From: mfowle at navicominc.com (Mark Fowle) Date: Tue, 23 Jun 2009 13:41:28 -0400 Subject: [tpm] CPAN Recursive Dependencies In-Reply-To: <77f3972e0906231031o320bb087rc8a6239deeaf70d8@mail.gmail.com> Message-ID: <759E3F14A23281479A85A082BBCFA54267DD0F@sbsa.NavicomInc.local> Run through each one at a time: File::Spec Scalar::Util Test::More Test::Harness. ETC. until you have only two, or a few interlinked modules left, then, if you can't solve it, force install each of the ones left. I've never had Bundle::CPAN fail on a linked dependence, but hey each dist is a little different. Maybe run reload index ________________________________ From: toronto-pm-bounces+mfowle=navicominc.com at pm.org [mailto:toronto-pm-bounces+mfowle=navicominc.com at pm.org] On Behalf Of Quantum Mechanic Sent: Tuesday, June 23, 2009 1:31 PM To: Fulko Hew Cc: TPM Toronto Perl Mongers Subject: Re: [tpm] CPAN Recursive Dependencies On Tue, Jun 23, 2009 at 12:32 PM, Fulko Hew wrote: On Tue, Jun 23, 2009 at 12:21 PM, Quantum Mechanic wrote: ... snip ... Recursive dependency detected: Bundle::CPAN => Test::Harness => A/AN/ANDYA/Test-Harness-3.17.tar.gz => File::Spec => S/SM/SMUELLER/PathTools-3.30.tar.gz => Scalar::Util => G/GB/GBARR/Scalar-List-Utils-1.21.tar.gz => Test::More => M/MS/MSCHWERN/Test-Simple-0.88.tar.gz => Test::Harness. Cannot continue. Um, geez, how do I fix this? I can't say for sure, but someone once suggested to me (on a similar?) problem I was having... - Manually install the offending module (Test::Harness) and then re-try installing your original goal. OK, that gave me the same end result, recursive dependency. -- -QM Quantum Mechanics: The dreams stuff is made of -------------- next part -------------- An HTML attachment was scrubbed... URL: From quantum.mechanic.1964 at gmail.com Tue Jun 23 10:49:53 2009 From: quantum.mechanic.1964 at gmail.com (Quantum Mechanic) Date: Tue, 23 Jun 2009 13:49:53 -0400 Subject: [tpm] CPAN Recursive Dependencies In-Reply-To: <759E3F14A23281479A85A082BBCFA54267DD0F@sbsa.NavicomInc.local> References: <77f3972e0906231031o320bb087rc8a6239deeaf70d8@mail.gmail.com> <759E3F14A23281479A85A082BBCFA54267DD0F@sbsa.NavicomInc.local> Message-ID: <77f3972e0906231049p581712dcq825b042004eaefd6@mail.gmail.com> On Tue, Jun 23, 2009 at 1:41 PM, Mark Fowle wrote: > Run through each one at a time: > > File::Spec > Scalar::Util > Test::More > Test::Harness. > > Thanks, good idea. I've been looking at my cpan config file, maybe I've specified the path to perl for makepl incorrectly. So the individual module would install, but the next one dependent on it wouldn't see it (PERL5LIB doesn't match makepl path?) About once a year I go through this, and recollection dawns on me after lots of hairpulling. I'm thinking "Surely this stuff is tested, right?", and it is. But the user isn't. -- -QM Quantum Mechanics: The dreams stuff is made of -------------- next part -------------- An HTML attachment was scrubbed... URL: From legrady at gmail.com Tue Jun 23 15:16:04 2009 From: legrady at gmail.com (Tom Legrady) Date: Tue, 23 Jun 2009 18:16:04 -0400 Subject: [tpm] CPAN Recursive Dependencies In-Reply-To: <77f3972e0906231049p581712dcq825b042004eaefd6@mail.gmail.com> References: <77f3972e0906231031o320bb087rc8a6239deeaf70d8@mail.gmail.com> <759E3F14A23281479A85A082BBCFA54267DD0F@sbsa.NavicomInc.local> <77f3972e0906231049p581712dcq825b042004eaefd6@mail.gmail.com> Message-ID: <3c9af5830906231516mbd6549dkd0817005385b00de@mail.gmail.com> While you can use Perl -MCPAN -e'shell', you can also use the 'cpan command' which includes -i install and -f force flags. So I would try cpan -fi Test::Harness The other option is to figure out where it stores that it should automatically load dependencies, and disable that, so an install only reports dependencies, rather than trying to install them. I had no problems when I installed Bundle::CPAN a few weeks back ... but I did have problems differentiating between the Perl5.10 I installed for my own use, and the Perl5.8 Mac OSX uses On Tue, Jun 23, 2009 at 1:49 PM, Quantum Mechanic < quantum.mechanic.1964 at gmail.com> wrote: > > > On Tue, Jun 23, 2009 at 1:41 PM, Mark Fowle wrote: > >> Run through each one at a time: >> >> File::Spec >> Scalar::Util >> Test::More >> Test::Harness. >> >> Thanks, good idea. > > I've been looking at my cpan config file, maybe I've specified the path to > perl for makepl incorrectly. So the individual module would install, but the > next one dependent on it wouldn't see it (PERL5LIB doesn't match makepl > path?) > > About once a year I go through this, and recollection dawns on me after > lots of hairpulling. I'm thinking "Surely this stuff is tested, right?", and > it is. But the user isn't. > > > > -- > -QM > Quantum Mechanics: The dreams stuff is made of > > _______________________________________________ > toronto-pm mailing list > toronto-pm at pm.org > http://mail.pm.org/mailman/listinfo/toronto-pm > > -------------- next part -------------- An HTML attachment was scrubbed... URL: