Re: testing with a "warn"

2016-04-29 Thread rnhainsworth
Hi. Sorry to ask again, but there are two independent questions here. 1) What is the purpose or best use of 'warn'. 2) How to test code that contains a 'warn' used as it should be. 1) I thought that a 'warn' would be used where sometimes the user would want a fail but not always. I have a

Re: Helping Perl 6: a complete dev environment

2016-04-29 Thread Jovan Trujillo
I see Padre has hooks for running Perl 6 and even parrot code. Don't know if Git is built into it yet. Probably easier to get started than using Emacs or spacemacs Sent from my iPhone > On Apr 28, 2016, at 3:26 PM, Tom Browder wrote: > > Is there a pointer somewhere on

testing with a "warn"

2016-04-29 Thread Richard Hainsworth
I have a condition that uses warn something like (its just an illustration) sub abc { ... if $iterations > 150 { $iterations = 150; warn 'excess recursion, clamping at 150'; } In my test suite I tried throws-like { abc('excess') }, Exception, 'got the exception', message =>

Re: testing with a "warn"

2016-04-29 Thread Brandon Allbery
On Fri, Apr 29, 2016 at 1:25 AM, Richard Hainsworth wrote: > throws-like { abc('excess') }, Exception, 'got the exception', message => > / excess recursion /; I'm confused as to why you would expect this to work. The point of warn is it is *not* an exception; an exception by

Re: testing with a "warn"

2016-04-29 Thread Timo Paulssen
I didn't actually read the other mail in this thread yet, but you can catch a control exception (like warn uses) with a CONTROL block. Don't forget to .resume the exception unless you want it to break out of your code, too. Hope to help! - Timo

Re: testing with a "warn"

2016-04-29 Thread Brandon Allbery
On Fri, Apr 29, 2016 at 3:47 PM, Brandon Allbery wrote: > Oh, they are resumable exceptions? Useful but rather high cost I'd think. > (Granting that perl6 isn't one of those languages that think exceptions > should be normal control flow. But anyone who decides it should be

Re: Helping Perl 6: a complete dev environment

2016-04-29 Thread Timo Paulssen
I just have a ~/perl6 where i have a clone of MoarVM/MoarVM, perl6/nqp, and rakudo/rakudo. You just have to provide each Configure.pl with the same --prefiix - in my case that's ~/perl6/install - then everything will find each other. There's some extra paths in my $PATH:

Re: Difficulty Installing Module on Latest Rakudo Star

2016-04-29 Thread Joe Polanik -X (jpolanik - RESOLVIT RESOURCES LLC at Cisco)
Hmmm, No that gets a similar error. $ perl6 -MDigest -e1 ===SORRY!=== Could not find Digest at line 1 in: /Users/jpolanik/.perl6 /Applications/Rakudo/share/perl6/site /Applications/Rakudo/share/perl6/vendor /Applications/Rakudo/share/perl6

Re: testing with a "warn"

2016-04-29 Thread Brandon Allbery
On Fri, Apr 29, 2016 at 6:45 PM, Larry Wall wrote: > If you need to produce actual warnings in hot code, something's wrong > with your design. (If you just want to print to STDERR, you can use > 'note' instead.) > The latter's more what I was getting at, yes. -- brandon s

Re: Difficulty Installing Module on Latest Rakudo Star

2016-04-29 Thread Tadeusz Sośnierz
Right; looks like Digest isn't properly installed after all. Try 'panda --force install Digest'? On 29/04/16 23:39, Joe Polanik -X (jpolanik - RESOLVIT RESOURCES LLC at Cisco) wrote: Hmmm, No that gets a similar error. $ perl6 -MDigest -e1 ===SORRY!=== Could not find Digest at line 1 in:

Re: Difficulty Installing Module on Latest Rakudo Star

2016-04-29 Thread Tadeusz Sośnierz
Alright. You mention Digest itself being installed, so just to be sure: 'perl6 -MDigest -e1' works fine? On 29/04/16 23:21, Joe Polanik -X (jpolanik - RESOLVIT RESOURCES LLC at Cisco) wrote: Tadeusz, I tried using —force because I initially thought I would be reinstalling Bailador.