Fwd: [CPAN Upload: P/PE/PETDANCE/Test-Harness-2.51_02.tar.gz: [EMAIL PROTECTED]

2005-06-26 Thread Andy Lester
I've just uploaded Test::Harness 2.51_02. It turns off the timer by default, and adds a --timer switch to prove. Please try it out and see if all is well because I'm going to make it 2.52 tomorrow. And now, I must go to bed so I can drive to Toronto... xoxo, Andy -- Andy Lester = [EMAIL

Re: What is the default MRO?

2005-06-26 Thread Leopold Toetsch
Roger Browne wrote: Hi, What is parrot's default method resolution order? Is it like the old Python MRO (left-to-right, depth-first)? Is it like the new Python MRO [1] (left-to-right, depth-first, but discard all but the last occurrence of duplicates)? The latter. See also the test

Re: [perl #36385] Some Tests Failing on Win32 for 8443 revision

2005-06-26 Thread Leopold Toetsch
Craig (via RT) wrote: Downloaded revision 8443 of Parrot to Windows XP Pro using SVN. When using 'nmake' 7.10.3077, some of the test are failing. According to the gettingstarted.pod, none of the tests should fail. README.win32 is more specific - dynclasses are currently broken. Thanks,

Re: is_deeply() and code refs

2005-06-26 Thread Tels
-BEGIN PGP SIGNED MESSAGE- Moin, On Sunday 26 June 2005 07:18, Collin Winter wrote: My initial quick-glance at B::Deparse's documentation mentions something about perl optimising certain constants away, which could well throw a spanner into the works. Storable uses B::Deparse

Magic mutators and my $var is Proxy( ... );

2005-06-26 Thread Sam Vilain
To me it is a trivial case that you want to provide a fake attribute which for all intents and purposes behaves exactly like there was a real attribute there, backing against another attribute. A Date object is a classic example of this; you want to provide 0-based and 1-based attributes, which

Re: takers wanted - a perl job

2005-06-26 Thread Sam Vilain
Joshua Juran wrote: scalar number (possibly complex) real rational integer Integer BigInt Ratio Float Complex Quaternion String ... Trying to fit every problem

Re: is_deeply() and code refs

2005-06-26 Thread Michael G Schwern
On Sun, Jun 26, 2005 at 10:25:51AM +0200, Tels wrote: After tinkering with B::Deparse for a bit, I think this particular oddity may just be a result of poorly-written docs (or, more probably, poorly-read on my part). The module seems to do the right thing in all cases I could come up with

Re: is_deeply() and code refs

2005-06-26 Thread Michael G Schwern
On Sun, Jun 26, 2005 at 01:18:42AM -0400, Collin Winter wrote: With this matter sorted, I've started on the code and requisite tests to make the new stuff work. Ok, let me know when you have something. -- Michael G Schwern [EMAIL PROTECTED] http://www.pobox.com/~schwern Reality is

Re: is_deeply() and code refs

2005-06-26 Thread David Landgren
Tels wrote : -BEGIN PGP SIGNED MESSAGE- Moin, On Sunday 26 June 2005 07:18, Collin Winter wrote: [...] After tinkering with B::Deparse for a bit, I think this particular oddity may just be a result of poorly-written docs (or, more probably, poorly-read on my part). The module seems

OO magic (at least for me)

2005-06-26 Thread BÁRTHÁZI András
Hi, I'm wondering, if it's possible with Perl 6 or not? class MyClass { method mymethod($par) { say mymethod called!; } } class ExClass is MyClass { mymethod(12); } # pugs myprog mymethod called! I would like to use mymethod to add ExClass some

Re: is_deeply() and code refs

2005-06-26 Thread Michael G Schwern
On Sun, Jun 26, 2005 at 12:06:47PM +0200, David Landgren wrote: What it *shouldn't* do is what Test.pm does, namely execute the code ref and compare the values returned. It would just compare the refernces. Why should it not do that? Is this because of subs with side effects? Isn't

Re: is_deeply() and code refs

2005-06-26 Thread Fergal Daly
You have 3 situations 1 the refs came from \somefunc 2 the refs come from evaling strings of code 3 the refs are closures and therefore have some data associated with them For 3, it looks like B::Deparse does't handle the data at all so even if the deparsed subs are identical they may behave

Re: is_deeply() and code refs

2005-06-26 Thread Smylers
David Landgren writes: Michael Schwern wrote at the beginning of this thread: What it *shouldn't* do is what Test.pm does, namely execute the code ref and compare the values returned. It would just compare the refernces. Why should it not do that? Is this because of subs with side

Re: is_deeply() and code refs

2005-06-26 Thread Collin Winter
On 6/26/05, Fergal Daly [EMAIL PROTECTED] wrote: You have 3 situations 1 the refs came from \somefunc 2 the refs come from evaling strings of code 3 the refs are closures and therefore have some data associated with them For 3, it looks like B::Deparse does't handle the data at all so

Re: OO magic (at least for me)

2005-06-26 Thread Piers Cawley
BÁRTHÁZI András [EMAIL PROTECTED] writes: Hi, I'm wondering, if it's possible with Perl 6 or not? class MyClass { method mymethod($par) { say mymethod called!; } } class ExClass is MyClass { mymethod(12); } # pugs myprog mymethod called! I

Re: OO magic (at least for me)

2005-06-26 Thread BÁRTHÁZI András
Hi! I'm trying to answering my questions. Still interested in some official answer. :) --- 8 --- 8 --- 8 --- 8 --- 8 --- 8 --- 8 --- class MyMethod { method fun1() { fun2(); } method fun2() { say fun2!; } } class Child is MyMethod { } Child.fun1(); --- 8 ---

Re: OO magic (at least for me)

2005-06-26 Thread Juerd
BÁRTHÁZI András skribis 2005-06-26 19:35 (+0200): method fun1() { fun2(); } method fun2() { say fun2!; } *** No compatible subroutine found: fun2 fun2 is a method, not a sub. You need method syntax to call it: ./fun2; class MyMethod { method fun1() { fun2(); } sub fun2() { say

Re: OO magic (at least for me)

2005-06-26 Thread BÁRTHÁZI András
Hi, method fun1() { fun2(); } method fun2() { say fun2!; } *** No compatible subroutine found: fun2 fun2 is a method, not a sub. You need method syntax to call it: ./fun2; Hmm. It really works. :) I'm getting the idea, what's the difference between methods and subs. Anyway, my

Re: OO magic (at least for me)

2005-06-26 Thread Juerd
BÁRTHÁZI András skribis 2005-06-26 20:07 (+0200): Hmm. It really works. :) I'm getting the idea, what's the difference between methods and subs. Anyway, my implementation is, that ./ means self's method - and the class is not an instance, so it has no self. The invocant can be a class too.

Re: is_deeply() and code refs

2005-06-26 Thread Michael G Schwern
On Sun, Jun 26, 2005 at 12:57:05PM +0100, Fergal Daly wrote: 1 the refs came from \somefunc 2 the refs come from evaling strings of code 3 the refs are closures and therefore have some data associated with them For 3, it looks like B::Deparse does't handle the data at all so even if the

Re: Magic mutators and my $var is Proxy( ... );

2005-06-26 Thread Sam Vilain
Sam Vilain wrote: To me it is a trivial case that you want to provide a fake attribute which for all intents and purposes behaves exactly like there was a real attribute there, backing against another attribute. A Date object is a classic example of this; you want to provide 0-based and 1-based

Re: AUTLOAD and $_

2005-06-26 Thread Sam Vilain
Piers Cawley wrote: For myself, I'd like to see AUTOLOAD with a signature along the lines of: sub AUTOLOAD (Symbol $sym, ArgumentCollection $args, Continuation $cc) returns (Code | Pair) { ... } This presupposes a deal of support infrastructure, but also provides flexibility.

Test::More diagnostic change... again

2005-06-26 Thread Michael G Schwern
I just went to go patch in the code ref stuff to is_deeply() and found that I had unfinished changes to the diagnostic output. Remember, it was about including the description in the failure diagnostics. So instead of this: /Users/schwern/tmp/test...NOK 1

Re: is_deeply() and code refs

2005-06-26 Thread Michael G Schwern
On Mon, Jun 27, 2005 at 01:41:30AM +0100, Fergal Daly wrote: I'm not sure there is a right way to deparse closures (in general). For example if a variable is shared between 2 closures then it only makes sense to deparse both of them together. Deparsing them in turn will lose the sharedness

Re: Re: is_deeply() and code refs

2005-06-26 Thread leif . eriksen
[EMAIL PROTECTED] wrote: Another way to look at the eval case is to apply it to other references. is_deeply( eval { foo = 42, bar = 23 }, { bar, 42, foo, 23 } ); Even though the code is written differently the resulting data is the same. Would anyone be in doubt

Re: Re: is_deeply() and code refs

2005-06-26 Thread Michael G Schwern
On Mon, Jun 27, 2005 at 11:36:13AM +1000, [EMAIL PROTECTED] wrote: Another way to look at the eval case is to apply it to other references. is_deeply( eval { foo = 42, bar = 23 }, { bar, 42, foo, 23 } ); Even though the code is written differently the resulting data is

Re: Magic mutators and my $var is Proxy( ... );

2005-06-26 Thread Luke Palmer
On 6/26/05, Sam Vilain [EMAIL PROTECTED] wrote: So, we've got this my $var is Proxy( ... ) construct in A06. Say you've got this class: class MagicVal { has Int $.varies is rw; method varies returns Int is rw { return my $var is Proxy ( :for($.varies),