Re: if not C<,> then what?

2004-07-09 Thread Michele Dondi
On Thu, 1 Jul 2004, Alexey Trofimenko wrote: > if we really about to lose C-style comma, would we have something new > instead? A late thought, but since I am one of thow whose' keen on the print,next if /stgh/; kinda syntax too, and I, for one, will regret not having it anymore, I wonder wet

Re: if not C<,> then what?

2004-07-09 Thread Juerd
Michele Dondi skribis 2004-07-09 10:39 (+0200): > kinda syntax too, and I, for one, will regret not having it anymore, I > wonder wether something vaguely like the following example could (be made > to) work: > print.then{next} if /stgh/; Ehm. It can probably be made to work with sufficient blac

Re: if not C<,> then what?

2004-07-09 Thread Michele Dondi
On Fri, 9 Jul 2004, Juerd wrote: > > wonder wether something vaguely like the following example could (be made > > to) work: > > print.then{next} if /stgh/; > > Ehm. It can probably be made to work with sufficient black magic, but I > fail to see how: > > - then as a method of print makes sens

Re: if not C<,> then what?

2004-07-09 Thread Juerd
Michele Dondi skribis 2004-07-09 11:39 (+0200): > > - then as a method of print makes sense > then as a method of everything How does then as a method make sense? A method has to be somehow related to the object. Don't use methods for syntactic sugar, Perl 6 has plenty of ways to add sugar without

Re: [IDEA] Drop into the debugger on failure

2004-07-09 Thread Fergal Daly
On Thu, Jul 08, 2004 at 08:40:54PM -0400, Michael G Schwern wrote: > On Thu, Jul 08, 2004 at 11:53:52PM +0100, Fergal Daly wrote: > > The main point was that the OO way works right now, > > So does event hooks. Hooks are things you can hang stuff off of, but > they're also used to snare things th

Re: [IDEA] Drop into the debugger on failure

2004-07-09 Thread Michael G Schwern
On Fri, Jul 09, 2004 at 10:40:54AM +0100, Fergal Daly wrote: > Is there a LexWrap equivalent of > > use Test::Builder::Vapour::Override; > > sub diag { > my ($self, $diag) = @_; > $self->SUPER::diag(colour_me($diag)); > } > > ? It seems that LexWrap wrappers can't do this as they can't chang

Re: [IDEA] Drop into the debugger on failure

2004-07-09 Thread Fergal Daly
On Fri, Jul 09, 2004 at 11:00:28AM -0400, Michael G Schwern wrote: > Never underestimate The Damian. For a moment I though I had. > #!/usr/bin/perl -w > > use Hook::LexWrap; > use Test::Builder; > use Term::ANSIColor; > > wrap *Test::Builder::diag, pre => sub { > $_[1] = color('red') . $_

Re: scalar subscripting

2004-07-09 Thread Jonathan Worthington
"Luke Palmer" <[EMAIL PROTECTED]> wrote: > Hans Ginzel writes: > > On Thu, Jul 08, 2004 at 09:12:16PM +1000, Gautam Gopalakrishnan wrote: > > > about string subscripting. Since $a[0] cannot be mistaken for array subscripting > > > anymore, could this now be used to peep into scalars? Looks easier t

Re: if not C<,> then what?

2004-07-09 Thread Dan Hursh
Michele Dondi wrote: A late thought, but since I am one of thow whose' keen on the print,next if /stgh/; Ouch. I hadn't thought of that. I'm a big fan of litering loops with discard(),next if dontCareBecause(); # it don't matter here type constructs. I was going to suggest pri

Phalanx: What if full coverage isn't possible?

2004-07-09 Thread Pete Krawczyk
Consider the following code: $impclass ||= implementor($scheme) || do { require URI::_foreign; $impclass = 'URI::_foreign'; }; That's in URI.pm, lines 54-58. Devel::Cover treats that as a conditional. So short of deleting URI::_foreign, that do BLOCK

Re: [IDEA] Drop into the debugger on failure

2004-07-09 Thread Andrew Pimlott
On Fri, Jul 09, 2004 at 11:00:28AM -0400, Michael G Schwern wrote: > wrap *Test::Builder::diag, pre => sub { > $_[1] = color('red') . $_[1]; > $_[-2] =~ s/$/color 'reset'/e; > }; Glancing at the Hook::LexWrap, I see it's possible to simulate an "around" wrapper by calling the original f

Re: if not C<,> then what?

2004-07-09 Thread Larry Wall
On Fri, Jul 09, 2004 at 10:39:56AM +0200, Michele Dondi wrote: : On Thu, 1 Jul 2004, Alexey Trofimenko wrote: : : > if we really about to lose C-style comma, would we have something new : > instead? : : A late thought, but since I am one of thow whose' keen on the : : print,next if /stgh/; :

Re: if not C<,> then what?

2004-07-09 Thread Austin Hastings
--- Larry Wall <[EMAIL PROTECTED]> wrote: > On Fri, Jul 09, 2004 at 10:39:56AM +0200, Michele Dondi wrote: > : On Thu, 1 Jul 2004, Alexey Trofimenko wrote: > : > : > if we really about to lose C-style comma, would we have something > new > : > instead? > : > : A late thought, but since I am one o

Re: scalar subscripting

2004-07-09 Thread Larry Wall
On Fri, Jul 09, 2004 at 05:02:48PM +0100, Jonathan Worthington wrote: : Would that not be:- : : say "Basename is $(str.subst(rx|.*/|, ''))" : : I thought when you were interpolating method calls you had to put brackets : $(object.meth), so that you could still write things like:- : : $fh = o

Re: if not C<,> then what?

2004-07-09 Thread Larry Wall
On Fri, Jul 09, 2004 at 11:23:09AM -0700, Austin Hastings wrote: : Will there be a statement modifier version of C? : : print, next when /stgh/; Yes, though in this case it's indistinguishable from C, since // defaults to $_ anyway. However, these are different: print, next when 3; p

Re: if not C<,> then what?

2004-07-09 Thread Austin Hastings
--- Larry Wall <[EMAIL PROTECTED]> wrote: > On Fri, Jul 09, 2004 at 11:23:09AM -0700, Austin Hastings wrote: > : Can there reasonably be block-postfix modifiers? > : > : { print; next; } if|when /stgh/; > > If there reasonably can be block modifiers, I will unreasonably > declare that there can

Re: if not C<,> then what?

2004-07-09 Thread Larry Wall
On Fri, Jul 09, 2004 at 11:51:52AM -0700, Austin Hastings wrote: : --- Larry Wall <[EMAIL PROTECTED]> wrote: : > On Fri, Jul 09, 2004 at 11:23:09AM -0700, Austin Hastings wrote: : > : Can there reasonably be block-postfix modifiers? : > : : > : { print; next; } if|when /stgh/; : > : > If there

[perl #30662] t/op/interp.t test 2 doesn't cater for DOD

2004-07-09 Thread via RT
# New Ticket Created by Nicholas Clark # Please include the string: [perl #30662] # in the subject line of all future correspondence about this issue. # http://rt.perl.org:80/rt3/Ticket/Display.html?id=30662 > --- osname= darwin osvers= 7.0 arch= darwin-thread-multi-2level cc= cc --- F

Re: Phalanx: What if full coverage isn't possible? (fwd)

2004-07-09 Thread Andy Lester
> There's a whole set of these sort of problems. > > sub new { > my $proto = shift; > my $class = ref $proto || $proto; In this case, we probably don't want that ANYWAY. That's what I did when I was through Data::Page for Leon Brocard, and it's now at 100% coverage, across the

Re: Phalanx: What if full coverage isn't possible?

2004-07-09 Thread Michael G Schwern
On Fri, Jul 09, 2004 at 12:10:52PM -0500, Pete Krawczyk wrote: > Consider the following code: > > $impclass ||= implementor($scheme) || > do { > require URI::_foreign; > $impclass = 'URI::_foreign'; > }; > > That's in URI.pm, lines 54-58. > > Devel::Co

Re: if not C<,> then what?

2004-07-09 Thread Austin Hastings
--- Larry Wall <[EMAIL PROTECTED]> wrote: > On Fri, Jul 09, 2004 at 11:51:52AM -0700, Austin Hastings wrote: > : --- Larry Wall <[EMAIL PROTECTED]> wrote: > : > If there reasonably can be block modifiers, I will unreasonably > : > declare that there can't be. > : > : Be as unreasonable as you wa

Re: Phalanx: What if full coverage isn't possible?

2004-07-09 Thread Ricardo SIGNES
* Pete Krawczyk <[EMAIL PROTECTED]> [2004-07-09T13:10:52] > > Devel::Cover will always see that as a partial test, and never a full > test: > [ ... ] > Is that a bug, then? Or is it something else? And how should I notate > that, keeping in mind the goals of Phalanx, so that it's clearly visibl

Re: Phalanx: What if full coverage isn't possible? (fwd)

2004-07-09 Thread Michael G Schwern
On Fri, Jul 09, 2004 at 05:06:09PM -0500, Andy Lester wrote: > > There's a whole set of these sort of problems. Looking through a coverage analysis I just ran, here's some more idioms that trip up 100% coverage. my $foo = $bar || ''; my $foo = $bar || 1; $this || retu

Re: Phalanx: What if full coverage isn't possible? (fwd)

2004-07-09 Thread Michael G Schwern
On Fri, Jul 09, 2004 at 06:31:09PM -0400, Michael G Schwern wrote: > Looking through a coverage analysis I just ran, here's some more idioms > that trip up 100% coverage. > > my $foo = $bar || ''; > > my $foo = $bar || 1; > > $this || return; > > Basically anything of the "$f

Re: [perl #30662] t/op/interp.t test 2 doesn't cater for DOD

2004-07-09 Thread Leopold Toetsch
Nicholas Clark <[EMAIL PROTECTED]> wrote: > Am I right in thinking that with trace of 1, it's perfectly acceptable for > the core to print this DOD message, and therefore that the test is wrong > in its expectations? Yep. > ... ie it's regexp of expected output needs changing to > accept the "DO

Re: Phalanx: What if full coverage isn't possible?

2004-07-09 Thread Paul Johnson
On Fri, Jul 09, 2004 at 12:10:52PM -0500, Pete Krawczyk wrote: > Consider the following code: > > $impclass ||= implementor($scheme) || > do { > require URI::_foreign; > $impclass = 'URI::_foreign'; > }; > > That's in URI.pm, lines 54-58. > > Devel::C

Pie-thon state 3

2004-07-09 Thread Leopold Toetsch
Another week's gone, some more to come :) Here's this weeks summary of Pie-thon approaches. As Dan's computer seems to have aquired a serious psychosoamtic disease in conjunction with Python, I'm sending the summary to the list too ;) * not too much docs - you know why * languages/python/t/*/*.

Re: question regarding rules and bytes vs characters

2004-07-09 Thread Larry Wall
On Tue, Jun 01, 2004 at 07:56:41AM +0200, Ph. Marek wrote: : Hello everybody, : : I'm about to learn myself perl6 (after using perl5 for some time). I'm also trying to learn perl6 after using perl5 for some time. :-) : One of my first questions deals with regexes. : : : I'd like to parse data

RE: if not C<,> then what?

2004-07-09 Thread Joe Gottman
> -Original Message- > From: Larry Wall [mailto:[EMAIL PROTECTED] > Sent: Friday, July 09, 2004 2:33 PM > To: [EMAIL PROTECTED] > Subject: Re: if not C<,> then what? > > On Fri, Jul 09, 2004 at 11:23:09AM -0700, Austin Hastings wrote: > : Will there be a statement modifier version of C?

Re: if not C<,> then what?

2004-07-09 Thread Alexey Trofimenko
On Fri, 9 Jul 2004 20:14:32 -0400, Joe Gottman <[EMAIL PROTECTED]> wrote: -Original Message- From: Larry Wall [mailto:[EMAIL PROTECTED] Sent: Friday, July 09, 2004 2:33 PM To: [EMAIL PROTECTED] Subject: Re: if not C<,> then what? On Fri, Jul 09, 2004 at 11:23:09AM -0700, Austin Hastings

Re: if not C<,> then what?

2004-07-09 Thread Larry Wall
On Sat, Jul 10, 2004 at 04:35:35AM +0400, Alexey Trofimenko wrote: : On Fri, 9 Jul 2004 20:14:32 -0400, Joe Gottman <[EMAIL PROTECTED]> : wrote: : > Will given be a statement modifier also? This would be useful for : >quick : >topicalization: : > : > say "$_ => %hash{$_}" given get_random

Re: if not C<,> then what?

2004-07-09 Thread Alexey Trofimenko
On Fri, 9 Jul 2004 13:19:46 -0700 (PDT), Austin Hastings <[EMAIL PROTECTED]> wrote: --- Larry Wall <[EMAIL PROTECTED]> wrote: If there reasonably can be block modifiers, I will unreasonably declare that there can't be. You can always say: do { print; next; } if|when /stgh/; (It's still the ca

Re: "=>" brother

2004-07-09 Thread Larry Wall
On Sun, Jun 20, 2004 at 03:41:41AM +0400, Alexey Trofimenko wrote: : There was some talks about hash keys autoquoting and barewords.. later are : gone and former is disambigued by forcing to write %hash{'key'} or : %hash«key» ( as opposite to %hash{key} which is now %hash{key()} ).. : right?.

Re: if not C<,> then what?

2004-07-09 Thread Larry Wall
On Sat, Jul 10, 2004 at 04:58:49AM +0400, Alexey Trofimenko wrote: : On Fri, 9 Jul 2004 13:19:46 -0700 (PDT), Austin Hastings : <[EMAIL PROTECTED]> wrote: : : >--- Larry Wall <[EMAIL PROTECTED]> wrote: : >>If there reasonably can be block modifiers, I will unreasonably : >>declare that there can

Re: if not C<,> then what?

2004-07-09 Thread Alexey Trofimenko
On Fri, 9 Jul 2004 11:13:29 -0700, Larry Wall <[EMAIL PROTECTED]> wrote: On Fri, Jul 09, 2004 at 10:39:56AM +0200, Michele Dondi wrote: : On Thu, 1 Jul 2004, Alexey Trofimenko wrote: : : > if we really about to lose C-style comma, would we have something new : > instead? : : A late thought, but sin

Re: if not C<,> then what?

2004-07-09 Thread Brent 'Dax' Royal-Gordon
Except people don't actually read the documentation, and when they do read it, they don't understand it, and when they do understand it, they'll write it wrong anyway out of habit. You might as well write your warning in Russian for all the good it'll do. :-) So we'll force people who want any lo

Re: if not C<,> then what?

2004-07-09 Thread Larry Wall
On Sat, Jul 10, 2004 at 05:12:54AM +0400, Alexey Trofimenko wrote: : perl is filled with functions which do different things in different : contexts. It seems that in perl6 with plenty of "new contexts", it will : be even more stimuls for that habit. So real question is: : in expression C< a

Re: if not C<,> then what?

2004-07-09 Thread Alexey Trofimenko
On Fri, 9 Jul 2004 18:25:40 -0700, Larry Wall <[EMAIL PROTECTED]> wrote: On Sat, Jul 10, 2004 at 05:12:54AM +0400, Alexey Trofimenko wrote: : perl is filled with functions which do different things in different : contexts. It seems that in perl6 with plenty of "new contexts", it will : be even mor

Re: "=>" brother

2004-07-09 Thread Alexey Trofimenko
On Fri, 9 Jul 2004 18:00:44 -0700, Larry Wall <[EMAIL PROTECTED]> wrote: On Sun, Jun 20, 2004 at 03:41:41AM +0400, Alexey Trofimenko wrote: : There was some talks about hash keys autoquoting and barewords.. later are : gone and former is disambigued by forcing to write %hash{'key'} or : %hashÂkey

Re: "=>" brother

2004-07-09 Thread Luke Palmer
Alexey Trofimenko writes: > >Arguably, the :shiftÂvalue syntax makes it easier to quote both > >sides of a pair, so perhaps there's a little less need for an > >autoquoting =>. But I think that generating non-quoted keys for > >subscripting happens a lot more often than non-quoted keys for pairs,

Re: Phalanx: What if full coverage isn't possible?

2004-07-09 Thread Michael Carman
On 7/9/2004 4:57 PM, Paul Johnson wrote: > On Fri, Jul 09, 2004 at 12:10:52PM -0500, Pete Krawczyk wrote: > >> Consider [code with unreachable path] Devel::Cover will always see that as >> a partial test, and never a full test: Is that a bug, then? That's for you to decide. The lack of coverage s