Autrijus Tang said:
> ...and I fixed the bug promptly. :)
I'm getting this error:
pugs> 10.round
*** Undeclared variable: "&do_round"
at src/perl6/Prelude.pm line 278, column 9 - line 279, column 5
This is the Prelude code:
sub do_round($n) is primitive is safe {
($n < 0)
On Tue, Jul 19, 2005 at 01:58:18PM -0500, [EMAIL PROTECTED] wrote:
> Now I want to contribute an example. It shows off named parameters with
> default values (including those of code type :-) as well as currying. It
> does this by implementing Newton's method for root finding. Is this
> appro
Autrijus Tang <[EMAIL PROTECTED]> wrote:
> I get errors:
> 1..2
> ok 1 - default sub called
> not ok 2 - default sub called in package namespace
> # Failed test (t/subroutines/defaults.t line 35, column 1-62)
> #Got: undef
> # Looks like you failed 1 tests of 2
Did you perhaps had an
I was trying to debug this problem in Prelude.pm - I think it is the same bug:
pugs> my $x=1.222
1.222
pugs> $x.round
*** Undeclared variable: "&do_round"
at src/perl6/Prelude.pm line 278, column 9 - line 279, column 5
- Flavio S. Glock
On Tue, Jul 19, 2005 at 12:53:19PM -0500, [EMAIL PROTECTED] wrote:
> Thanks for working on this, but there is still a problem.
>
> When I run make test, the two tests both pass. When I run the test as:
>
> perl -Iblib/lib t/subroutines/defaults.t
"perl"?
> I get errors:
> 1..2
> ok 1 - default
Autrijus Tang <[EMAIL PROTECTED]> wrote:
On Mon, Jul 18, 2005 at 02:47:06PM -0500, [EMAIL PROTECTED] wrote:
> I did this. I included two tests, one without multiple packages (which
> works) and one with them (which fails). I marked the second test todo.
...and I fixed the bug promptly. :)
On Mon, Jul 18, 2005 at 02:47:06PM -0500, [EMAIL PROTECTED] wrote:
> I did this. I included two tests, one without multiple packages (which
> works) and one with them (which fails). I marked the second test todo.
...and I fixed the bug promptly. :)
> Thanks for the gentle help with this proces
Autrijus Tang <[EMAIL PROTECTED]> wrote:
On Mon, Jul 18, 2005 at 09:00:50AM -0500, [EMAIL PROTECTED] wrote:
> I made the test. The problem only occurs when the sub is called from
> another package, in my case that was a driving script.
> > I'm not sure how to accept the invitation (or what tha
On Mon, Jul 18, 2005 at 09:00:50AM -0500, [EMAIL PROTECTED] wrote:
> I made the test. The problem only occurs when the sub is called from
> another package, in my case that was a driving script.
>
> I'm not sure how to accept the invitation (or what that even means).
Oh. It means you should
Autrijus Tang <[EMAIL PROTECTED]> wrote:
On Fri, Jul 15, 2005 at 02:16:48PM -0500, [EMAIL PROTECTED] wrote:
> package MyModule;
> > use v6;
> sub doubler( Num $x ) {
>return 2 * $x;
> }
> > sub value_v( Code +$func = &MyModule::doubler ) is export {
>return $func( 5 );
> }
> > This wor
On Fri, Jul 15, 2005 at 02:16:48PM -0500, [EMAIL PROTECTED] wrote:
> package MyModule;
>
> use v6;
> sub doubler( Num $x ) {
>return 2 * $x;
> }
>
> sub value_v( Code +$func = &MyModule::doubler ) is export {
>return $func( 5 );
> }
>
> This works. But I think I should be able to say:
>
I've been playing with pugs a little bit. I like it a lot. I'm especially
interested in passing parameters to subs and giving them defaults.
While trying to Curry in the default of a Code reference parameter, I ran into
the following oddity (it seems odd to me). It looks like I must fully qu
12 matches
Mail list logo