Re: Perl 6 for system-wide use: best practice?

2016-02-23 Thread Paul Cochrane
Hi Tom,

On Mon, Feb 22, 2016 at 01:50:50PM -0600, Tom Browder wrote:
> What is recommended for installing Perl 6 for system-wide use?

if you are running a Debian-based system, you could try installing the
Debian Rakudo package from either the "stretch (testing)" or "sid
(unstable)" suite.  It is currently at Rakudo version 2015.11 however work
is in progress to get more recent Rakudo releases packaged.

Hope that helps a bit.

Cheers,

Paul


Re: Perl 6 for system-wide use: best practice?

2016-02-23 Thread Tom Browder
On Tue, Feb 23, 2016 at 6:10 AM, Paul Cochrane  wrote:
> On Mon, Feb 22, 2016 at 01:50:50PM -0600, Tom Browder wrote:
>> What is recommended for installing Perl 6 for system-wide use?
>
> if you are running a Debian-based system, you could try installing the
...

I am (I should have said that in my OP).

> Hope that helps a bit.

It does--thanks, Paul!

Best regards,

-Tom


Re: Need help with Nil values

2016-02-23 Thread Lloyd Fournier
You could just do:

method new (Str $value?) { ... } # makes value optional

and then not pass anything to .new.

On Tue, Feb 23, 2016 at 1:27 PM TS xx  wrote:

> Thanks Brandon,
>
>
> That was what I was looking for.
>
> I'm trying it already.
>
>
> Regards,
>
> Emiliano
>
>
> --
> *From:* Brandon Allbery 
> *Sent:* Tuesday, February 23, 2016 2:21 AM
> *To:* TS xx
> *Cc:* perl6-users@perl.org
>
> *Subject:* Re: Need help with Nil values
> On Mon, Feb 22, 2016 at 9:15 PM, TS xx  wrote:
>
>> I expect $.value to hold Strings, but I want to be able to instantiate
>> MyClass whether I have a value already or not, and I also want to be able
>> to tell if $.value has a real String or not. Is this possible?
>
>
> You don't want Nil there; it's not the undefined value, it's a value of a
> special type. You want Str, the type object for Strings, which also serves
> as the undefined value (also true for other types). You can test it with
> `defined`.
>
> $myObject = MyClass.new(Str);
>
> then you can test $!value.defined or whatever.
>
> --
> brandon s allbery kf8nh   sine nomine
> associates
> allber...@gmail.com
> ballb...@sinenomine.net
> unix, openafs, kerberos, infrastructure, xmonad
> http://sinenomine.net
>