Re: Extending classes in a lexical scope?

2009-01-14 Thread Ovid
- Original Message As far as I know, Perl6Array should _not_ be showing up in Perl 6's namespace, and if it is doing so, that's a reportable bug. I was just being sloppy. I was using that in PIR, not Rakudo, and I mistyped the type -- er, I wrote the wrong class name in writing

Re: Trimming arrays

2009-01-14 Thread Ovid
- Original Message From: Patrick R. Michaud pmich...@pobox.com I would expect this to be roughly equivalent to: for @array { $_ .= trim; } For an array of hashes, this would result in each hash element of @array being replaced with a reference to an array of the

Re: getting the face value of an enum

2009-01-14 Thread Richard Hainsworth
Can I suggest a new method to be declared with enums, viz. .face enum day Sun Mon Tue Wed Thur Fri Sat; my $today does day; $today = prompt Type in a day of the week ; #later say $today ; # prints 3 say $today.face; #prints Wed Whilst having an enum being a list of values is useful, not

Re: Trimming arrays

2009-01-14 Thread Patrick R. Michaud
On Wed, Jan 14, 2009 at 03:37:57AM -0800, Ovid wrote: - Original Message From: Patrick R. Michaud pmich...@pobox.com Oops -- I over-referenced here. The corrected form: For C @array».=trim , each element of @array would be replaced with its trimmed string representation.

Re: Read access to class-scope variables from the class scope

2009-01-14 Thread Larry Wall
On Mon, Jan 12, 2009 at 12:33:31PM +0100, Carl Mäsak wrote: : Writing something like this in Rakudo yesterday, I was slightly : surprised to find it not working: : : class SomeClass { : my $.warn_limit = 1000; : my $.stern_warn_limit = $.warn_limit * 1.05; : my $.expel_limit =