r25684 - docs/Perl6/Spec

2009-03-04 Thread pugs-commits
Author: lwall
Date: 2009-03-04 17:27:17 +0100 (Wed, 04 Mar 2009)
New Revision: 25684

Modified:
   docs/Perl6/Spec/S03-operators.pod
   docs/Perl6/Spec/S12-objects.pod
Log:
[S03] deprecate TOP in favor of .parse and .parsefile
[S12] mention restriction on calling class metamethods when there isn't a class


Modified: docs/Perl6/Spec/S03-operators.pod
===
--- docs/Perl6/Spec/S03-operators.pod   2009-03-04 09:53:11 UTC (rev 25683)
+++ docs/Perl6/Spec/S03-operators.pod   2009-03-04 16:27:17 UTC (rev 25684)
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall 
   Date: 8 Mar 2004
-  Last Modified: 26 Feb 2009
+  Last Modified: 4 Mar 2009
   Number: 3
-  Version: 155
+  Version: 156
 
 =head1 Overview
 
@@ -3142,7 +3142,7 @@
 List SeqArray
 KeySet KeyBag KeyHash   Hash
 Class Enum Role Type
-Subst Grammar   Regex
+Subst   Regex
 Char CatStr
 Int UInt etc.   Num
 Match   Capture
@@ -3165,15 +3165,9 @@
 to treat the buffer as other than a sequence integers is erroneous,
 and warnings may be generously issued.
 
-Matching against a C object will call the C method
-defined in the grammar.  The C method may either be a rule
-itself, or may call the actual top rule automatically.  How the
-C determines the top rule is up to the grammar, but normal
-Perl 6 grammars will default to setting top to the first rule in the
-original base grammar.  Derived grammars then inherit this idea of
-the top rule.  This may be overridden in either the base grammar or a
-derived grammar by explicitly naming a rule C, or defining your
-own C method to call some other rule.
+Matching against a C treats the grammar as a typename,
+not as a grammar.  You need to use the C<.parse> or C<.parsefile>
+methods to invoke a grammar.
 
 Matching against a C does not actually bind any variables,
 but only tests to see if the signature I bind.  To really bind

Modified: docs/Perl6/Spec/S12-objects.pod
===
--- docs/Perl6/Spec/S12-objects.pod 2009-03-04 09:53:11 UTC (rev 25683)
+++ docs/Perl6/Spec/S12-objects.pod 2009-03-04 16:27:17 UTC (rev 25684)
@@ -1604,6 +1604,9 @@
 $obj.HOW.methods($obj);
 $obj.^methods();
 
+(If you are using prototype-based OO rather than class-based, you must use
+the object form, since every such object functions as its own class.)
+
 Class traits may include:
 
 identifier  { :name :ver<1.2.1> :auth } 



r25685 - docs/Perl6/Spec

2009-03-04 Thread pugs-commits
Author: lwall
Date: 2009-03-04 20:20:59 +0100 (Wed, 04 Mar 2009)
New Revision: 25685

Modified:
   docs/Perl6/Spec/S02-bits.pod
   docs/Perl6/Spec/S03-operators.pod
   docs/Perl6/Spec/S04-control.pod
   docs/Perl6/Spec/S05-regex.pod
   docs/Perl6/Spec/S06-routines.pod
   docs/Perl6/Spec/S09-data.pod
   docs/Perl6/Spec/S12-objects.pod
Log:
Simplify meaning of Capture and Match in item context to preserve sanity
(an object in item context is always just itself, never a subpart)
Result objects now come though $/{''}, although they may still be created with
'make' and accessed with $().  (This is already how STD works, btw.)
The invocant (if any) of a Capture is now always considered 1st positional.
Clarify that foo(|$capture) delays choice of dispatcher
ruoso++ for forcing me to rethink all this


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2009-03-04 16:27:17 UTC (rev 25684)
+++ docs/Perl6/Spec/S02-bits.pod2009-03-04 19:20:59 UTC (rev 25685)
@@ -12,9 +12,9 @@
 
   Maintainer: Larry Wall 
   Date: 10 Aug 2004
-  Last Modified: 26 Feb 2009
+  Last Modified: 4 Mar 2009
   Number: 2
-  Version: 156
+  Version: 157
 
 This document summarizes Apocalypse 2, which covers small-scale
 lexical items and typological issues.  (These Synopses also contain
@@ -1535,8 +1535,10 @@
 
 $args = \(1,2,3,:mice)
 
-Values in a C object are parsed as ordinary expressions, marked as
-invocant, positional, named, and so on.
+Values in a C object are parsed as ordinary expressions, then marked 
as
+positional or named.  If the first positional is followed by a colon instead of
+a comma, it is marked as the invocant in case it finds itself in a context
+that cares.
 
 Like C objects, C objects are immutable in the abstract, but
 evaluate their arguments lazily.  Before everything inside a C is
@@ -1552,17 +1554,17 @@
 You may retrieve parts from a C object with a prefix sigil operator:
 
 $args = \3; # same as "$args = \(3)"
-$$args; # same as "$args as Scalar" or "Scalar($args)"
-@$args; # same as "$args as Array"  or "Array($args)"
-%$args; # same as "$args as Hash"   or "Hash($args)"
+@$args; # same as "Array($args)"
+%$args; # same as "Hash($args)"
 
 When cast into an array, you can access all the positional arguments; into a
-hash, all named arguments; into a scalar, its invocant.
+hash, all named arguments.
 
 All prefix sigil operators accept one positional argument, evaluated in
 item context as a rvalue.  They can interpolate in strings if called with
-parentheses.  The special syntax form C<$()> translates into C<$( $/ )> 
-to operate on the current match object; the same applies to C<@()> and C<%()>.
+parentheses.  The special syntax form C<$()> translates into C<$( $/{''} // 
Str($/) )> 
+to operate on the current match object; similarly C<@()> and C<%()> can
+extract positional and named submatches.
 
 C objects fill the ecological niche of references in Perl 6.
 You can think of them as "fat" references, that is, references that

Modified: docs/Perl6/Spec/S03-operators.pod
===
--- docs/Perl6/Spec/S03-operators.pod   2009-03-04 16:27:17 UTC (rev 25684)
+++ docs/Perl6/Spec/S03-operators.pod   2009-03-04 19:20:59 UTC (rev 25685)
@@ -14,7 +14,7 @@
   Date: 8 Mar 2004
   Last Modified: 4 Mar 2009
   Number: 3
-  Version: 156
+  Version: 157
 
 =head1 Overview
 
@@ -649,6 +649,9 @@
 
 Interpolates the contents of the C (or C-like) value
 into the current argument list as if they had been specified literally.
+If the first argument of the capture is marked as an invocant but is used
+in a context not expecting one, it is treated as an ordinary positional
+argument.
 
 =item *
 
@@ -1797,7 +1800,7 @@
 
 =back
 
-Many of these operators return a list of Captures, which depending on
+Many of these operators return a list of Cs, which depending on
 context may or may not flatten them all out into one flat list.  The
 default is to flatten, but see the contextualizers below.
 
@@ -1969,8 +1972,8 @@
 
 item foo()
 
-The new name for Perl 5's C contextualizer.  Equivalent to C<$()>
-(except that empty C<$()> means C<$($/)>, while empty C yields 
C).
+The new name for Perl 5's C contextualizer.  Equivalent to C<$(...)>
+(except that empty C<$()> means C<$/{''} // Str($/)>, while empty C 
yields C).
 We still call the values scalars, and talk about "scalar operators", but
 scalar operators are those that put their arguments into item context.
 
@@ -1990,7 +1993,7 @@
 
 Forces the subsequent expression to be evaluated in list context.
 A list of Cs will be transformed into a flat list.
-Equivalent to C<@()> (except that empty C<@()> means C<@($/)>, while
+Equivalent to C<@(...)> (except that empty C<@()> means C<@($/)>, while
 empty C means an empty list).
 
 =item *
@@ -2002,7 +20

r25693 - docs/Perl6/Spec

2009-03-04 Thread pugs-commits
Author: lwall
Date: 2009-03-04 23:30:37 +0100 (Wed, 04 Mar 2009)
New Revision: 25693

Modified:
   docs/Perl6/Spec/S12-objects.pod
Log:
clarify enum vs sub for moritz++


Modified: docs/Perl6/Spec/S12-objects.pod
===
--- docs/Perl6/Spec/S12-objects.pod 2009-03-04 22:27:08 UTC (rev 25692)
+++ docs/Perl6/Spec/S12-objects.pod 2009-03-04 22:30:37 UTC (rev 25693)
@@ -14,7 +14,7 @@
   Date: 27 Oct 2004
   Last Modified: 4 Mar 2009
   Number: 12
-  Version: 72
+  Version: 73
 
 =head1 Overview
 
@@ -1293,7 +1293,7 @@
 
 An enum is a low-level class that can function as a role or property.
 A given enum value can function as a subtype, a method, or as an ordinary
-value (an argumentless sub).  The names of the values are specified as a list:
+value.  The names of the values are specified as a list:
 
 my enum Day ['Sun','Mon','Tue','Wed','Thu','Fri','Sat'];
 my enum Day ;
@@ -1411,7 +1411,6 @@
 $x.does(day)
 $x.day == Tue
 day($x) == Tue
-Tue($x)
 $x.Tue
 
 all return true, and
@@ -1436,6 +1435,23 @@
 type C.  Never compare a value to "C", or even "C".
 Just use it in a boolean context.
 
+Like type names, enum names are parsed as standalone tokens
+representing scalar values, and don't look for any arguments.
+Unlike type names which are undefined protoobjects, enums are defined
+constant values.  Also unlike types, they do not respond to C<.()>.
+They may not be post-declared.
+
+our enum Maybe ;
+sub OK {...}
+$x = OK;   # certainly the enum value
+$x = OK()  # certainly the function
+
+Since there is an enum OK, the function OK may only be
+called using parentheses, never in list operator form.  (If there is
+a collision on two enum values that cancels them both, the function
+still may only be called with parentheses, since the enum symbol
+is "poisoned".)
+
 Enum types (and perhaps certain other finite, enumerable types such
 as finite ranges) define a C<.pick> method on the protoobject of
 that type.  Hence:



r25695 - docs/Perl6/Spec

2009-03-04 Thread pugs-commits
Author: lwall
Date: 2009-03-05 00:06:26 +0100 (Thu, 05 Mar 2009)
New Revision: 25695

Modified:
   docs/Perl6/Spec/S02-bits.pod
   docs/Perl6/Spec/S03-operators.pod
   docs/Perl6/Spec/S05-regex.pod
Log:
tweak result object from {''} into {'?'} 


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2009-03-04 22:44:06 UTC (rev 25694)
+++ docs/Perl6/Spec/S02-bits.pod2009-03-04 23:06:26 UTC (rev 25695)
@@ -1562,7 +1562,7 @@
 
 All prefix sigil operators accept one positional argument, evaluated in
 item context as a rvalue.  They can interpolate in strings if called with
-parentheses.  The special syntax form C<$()> translates into C<$( $/{''} // 
Str($/) )> 
+parentheses.  The special syntax form C<$()> translates into C<$( $ // 
Str($/) )> 
 to operate on the current match object; similarly C<@()> and C<%()> can
 extract positional and named submatches.
 

Modified: docs/Perl6/Spec/S03-operators.pod
===
--- docs/Perl6/Spec/S03-operators.pod   2009-03-04 22:44:06 UTC (rev 25694)
+++ docs/Perl6/Spec/S03-operators.pod   2009-03-04 23:06:26 UTC (rev 25695)
@@ -1973,7 +1973,7 @@
 item foo()
 
 The new name for Perl 5's C contextualizer.  Equivalent to C<$(...)>
-(except that empty C<$()> means C<$/{''} // Str($/)>, while empty C 
yields C).
+(except that empty C<$()> means C<$ // Str($/)>, while empty C 
yields C).
 We still call the values scalars, and talk about "scalar operators", but
 scalar operators are those that put their arguments into item context.
 

Modified: docs/Perl6/Spec/S05-regex.pod
===
--- docs/Perl6/Spec/S05-regex.pod   2009-03-04 22:44:06 UTC (rev 25694)
+++ docs/Perl6/Spec/S05-regex.pod   2009-03-04 23:06:26 UTC (rev 25695)
@@ -2402,7 +2402,7 @@
 However, sometimes you would like an alternate scalar value to ride
 along with the match.  This is called a I object, and it rides
 along in the null named key.
-C<$()> is a shorthand for C<$($/{''} // Str($/))>.
+C<$()> is a shorthand for C<$($ // Str($/))>.
 
 Therefore C<$()> is usually just the entire match string, but
 you can override that by calling C inside a regex:
@@ -2413,7 +2413,7 @@
 # match succeeds -- ignore the rest of the regex
 });
 
-This puts the result object into C<$/{''}>.  If a result object is
+This puts the result object into C<$>.  If a result object is
 returned that way, it may be of any type, not just a string.
 This makes it convenient to build up an abstract syntax tree of
 arbitrary node types.



Rakudo newbies

2009-03-04 Thread Timothy S. Nelson
	Hi all.  I've been hanging around on #perl6, and have heard a fairly 
regular complaint in the last few days.  3 or 4 people have turned up wanting 
to work on Rakudo, and not always been able to get the information that they 
wanted.


	I promised to write a message to the list complaining about this, but 
before I did, the main developers recognised the problem and discussed on IRC 
the steps they're planning to take to fix it.  As such, this is both a 
complaint message and an answer to it :).


	The basic plan is to turn rakudo.org into a centralised rakudo info 
point.  The plan is that all the information needed to be a developer will 
appear on it.  If you want to help in the process, ask for some rakudo.org 
editing power on #perl6, and go to work on the docs.  This new site is new 
enough that it's still very incomplete, but hopefully with a bit of teamwork, 
in a month or so we should have it to the point where it can help beginning 
developers.


:)


-
| Name: Tim Nelson | Because the Creator is,|
| E-mail: wayl...@wayland.id.au| I am   |
-

BEGIN GEEK CODE BLOCK
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- 
PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI D G+ e++> h! y-

-END GEEK CODE BLOCK-



Re: Fwd: More S29/S32 Masak ideas (fwd)

2009-03-04 Thread Timothy S. Nelson

Sorry, forgot to send this to the list.

-- Forwarded message --
Date: Wed, 4 Mar 2009 17:16:22 +1100 (EST)
From: Timothy S. Nelson 
To: Carl Mäsak 
Subject: Re: Fwd: More S29/S32 Masak ideas

On Tue, 3 Mar 2009, Carl Mäsak wrote:


#  context().

       Added to S29, but I still don't know where these should go..  Maybe 
on

Block?


S06:1940 seems to treat it as a pure function, not as methods. That
kind of makes sense, given its argument list.


	Yeah, I agree.  I guess I just like for everything to be a method on 
something, and some of them just have forms that work as functions as well :). 
And S06:2072 seems to imply that it goes on the Context; but maybe...


 context() === $?CONTEXT
 $?CONTEXT.context() === context().context()

?


# callsame, callwith, nextsame, nextwith, lastcall.

       Didn't know where these should go, but probably the same place as
context()/caller().


S06:2072 seems to say Block.


	Ok, thanks.  I have a question about that section.  Immediately above 
that list just above the section you talked about, it refers to the "returned 
context object".  I want to know what this can be.  Is it synonymous with 
Block?  With Code?  With something else?  Is it its own role?



# Method descriptor objects: .name, .signature, .as, .multi, .do.

       In Callable.pod

       .name is on Routine
       .signature is on Code
       .do is on Code (I'm guessing here)

       I'm not sure where the others go:
.multi must be on something that gets it into Routine
.as must be on something that gets it into Method (higher?)


See S12:1987 for this.


	Are these line numbers you're using?  POD line numbers?  I don't see a 
line 1987 in this (the file isn't big enough).



I still believe that must be interpreted as
there being a specific MethodDescriptor object on which all of .name,
..signature, .as, .multi, .do are attached.


       I'm guessing that .^methods should really return a bunch of Method
objects.


No, MethodDescriptor objects. See S12:1987.


	Hmm.  I don't like it :).  You may be right, but I was assuming that we 
were returning *Method* objects.



# Attribute descriptor objects: .name, .type, .scope, .rw, .private,
.accessor, .build, .readonly.

       I wonder what type would be appropriate for an attribute descriptor
object.  I haven't done anything with these either.


See S12:1999.


Only has 1764 lines in my editor.  And wc says 1763.

	I presume you're implying there should be an AttributeDescriptor role, 
yes?


:)


-
| Name: Tim Nelson | Because the Creator is,|
| E-mail: wayl...@wayland.id.au| I am   |
-

BEGIN GEEK CODE BLOCK
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ 
R(+) !tv b++ DI D G+ e++> h! y-

-END GEEK CODE BLOCK-

-
| Name: Tim Nelson | Because the Creator is,|
| E-mail: wayl...@wayland.id.au| I am   |
-

BEGIN GEEK CODE BLOCK
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- 
PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI D G+ e++> h! y-

-END GEEK CODE BLOCK-


Re: Fwd: More S29/S32 Masak ideas

2009-03-04 Thread Timothy S. Nelson

On Wed, 4 Mar 2009, Timothy S. Nelson wrote:


# Method descriptor objects: .name, .signature, .as, .multi, .do.

       In Callable.pod

       .name is on Routine
       .signature is on Code
       .do is on Code (I'm guessing here)

       I'm not sure where the others go:
.multi must be on something that gets it into Routine
.as must be on something that gets it into Method (higher?)


See S12:1987 for this.


	Are these line numbers you're using?  POD line numbers?  I don't see 
a line 1987 in this (the file isn't big enough).



I still believe that must be interpreted as
there being a specific MethodDescriptor object on which all of .name,
..signature, .as, .multi, .do are attached.


       I'm guessing that .^methods should really return a bunch of Method
objects.


No, MethodDescriptor objects. See S12:1987.


	Hmm.  I don't like it :).  You may be right, but I was assuming that 
we were returning *Method* objects.


	I asked $Larry about this on IRC; specifically I asked whether we were 
talking about a MethodDescriptor object or an Array of Method.  His answer:



that's one of the things I was gonna let the implementors flesh out



feel free to speculate and label it so :)



just keep it as simple as possible, but no simpler...


	In light of this, I'd argue that we should do it as an Array of 
Method, until we have a reason to think otherwise.  I'm expecting, of course, 
that if the implementors think this is a bad idea, they'll chime in and say so 
:).


	Furthermore, I'd argue that if the specs don't name a particular 
object type (ie. "method descriptor" isn't, "MethodDescriptor" would be) then 
we're free to try to figure it out ourselves.



# Attribute descriptor objects: .name, .type, .scope, .rw, .private,
.accessor, .build, .readonly.

       I wonder what type would be appropriate for an attribute descriptor
object.  I haven't done anything with these either.


See S12:1999.


Only has 1764 lines in my editor.  And wc says 1763.

	I presume you're implying there should be an AttributeDescriptor 
role, yes?


	...I'm not sure I agree that there should be an AttributeDescriptor 
role.


:)


-
| Name: Tim Nelson | Because the Creator is,|
| E-mail: wayl...@wayland.id.au| I am   |
-

BEGIN GEEK CODE BLOCK
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- 
PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI D G+ e++> h! y-

-END GEEK CODE BLOCK-


Re: Rakudo newbies

2009-03-04 Thread Andy Lester
	The basic plan is to turn rakudo.org into a centralised rakudo info  
point.  The plan is that all the information needed to be a  
developer will appear on it.  If you want to help in the process,  
ask for some rakudo.org editing power on #perl6, and go to work on  
the docs.  This new site is new enough that it's still very  
incomplete, but hopefully with a bit of teamwork, in a month or so  
we should have it to the point where it can help beginning developers.



You can create an account on rakudo.org at will, but to be able to  
edit pages, you'll need privileges.  Just email me for that.


Thanks very much to Ross Kendall for his help in setting up the  
Drupal.  We're building to usefully critical mass.


xoxo,
Andy

--
Andy Lester => a...@petdance.com => www.petdance.com => AIM:petdance





Re: Fwd: More S29/S32 Masak ideas

2009-03-04 Thread Carl Mäsak
Timothy (>), Larry (>]), Timothy (>>), Carl (>>>), Timothy ():
        I'm guessing that .^methods should really return a bunch of
 Method
 objects.
>>>
>>> No, MethodDescriptor objects. See S12:1987.
>>
>>        Hmm.  I don't like it :).  You may be right, but I was assuming
>> that we were returning *Method* objects.
>
>        I asked $Larry about this on IRC; specifically I asked whether we
> were talking about a MethodDescriptor object or an Array of Method.  His
> answer:
>
>] that's one of the things I was gonna let the implementors flesh out
>] feel free to speculate and label it so :)
>] just keep it as simple as possible, but no simpler...
>
>        In light of this, I'd argue that we should do it as an Array of
> Method, until we have a reason to think otherwise.  I'm expecting, of
> course, that if the implementors think this is a bad idea, they'll chime in
> and say so :).
>
>        Furthermore, I'd argue that if the specs don't name a particular
> object type (ie. "method descriptor" isn't, "MethodDescriptor" would be)
> then we're free to try to figure it out ourselves.

It seems that it simply comes down to naming, then. A Method object is
a method descriptor object.

General question: could I use the Method object to invoke the method
as well? Or is it just to describe a method?

// Carl


r25698 - docs/Perl6/Spec/S32-setting-library

2009-03-04 Thread pugs-commits
Author: wayland
Date: 2009-03-05 06:58:38 +0100 (Thu, 05 Mar 2009)
New Revision: 25698

Modified:
   docs/Perl6/Spec/S32-setting-library/Any.pod
   docs/Perl6/Spec/S32-setting-library/Scalar.pod
Log:
-   Moved "defined" and "undefined" from Scalar.pod to Any.pod, as per 
signature
-   Defined the Pattern role for Any


Modified: docs/Perl6/Spec/S32-setting-library/Any.pod
===
--- docs/Perl6/Spec/S32-setting-library/Any.pod 2009-03-05 03:54:17 UTC (rev 
25697)
+++ docs/Perl6/Spec/S32-setting-library/Any.pod 2009-03-05 05:58:38 UTC (rev 
25698)
@@ -28,8 +28,65 @@
 
 The following are defined in the C role:
 
+ role  Any does Object does Pattern {
+ our Bool multi sub eqv (Ordering @by, $a, $b) {...}
+ our Bool multi sub eqv (Ordering $by = &infix:, $a, $b) {...}
+
+ our Bool multi method defined ( Any $self) {...}
+ our Bool multi method defined ( Any $self, ::role ) {...}
+
+ our multi method undefine( Any $self ) {...}
+
+ our multi method clone (::T $self --> T) {...}
+ our multi method clone (::T $self, *%attributes --> T) {...}
+
+ our Order multi sub cmp (Ordering @by, $a, $b) {...}
+ our Order multi sub cmp (Ordering $by = &infix:, $a, $b) {...}
+
+ our Callable multi method can ($self:, Str $method) {...}
+ our Bool multi method does ($self:, $type) {...}
+ our Bool multi method isa  ($self:, $type) {...}
+ our Str  multi method perl ( Object $o: ) is export {...}
+ our  multi method warn ( Object $o: ) is export {...}
+ }
+
 =over
 
+=item defined
+
+  our Bool multi defined ( Any $thing )
+  our Bool multi defined ( Any $thing, ::role )
+  our Bool multi method defined ( Any $self)
+  our Bool multi method defined ( Any $self, ::role )
+
+C returns true if the parameter has a value and that value is
+not the undefined value (per C), otherwise false is returned.
+
+Same as Perl 5, only takes extra optional argument to ask if value is defined
+with respect to a particular role:
+
+  defined($x, SomeRole);
+
+A value may be defined according to one role and undefined according to 
another.
+Without the extra argument, defaults to the definition of defined supplied by
+the type of the object.
+
+=item undefine
+
+  our multi undefine( Any $thing )
+  our multi method undefine( Any $self )
+
+Takes any variable as a parameter and attempts to "remove" its
+definition. For simple scalar variables this means assigning
+the undefined value to the variable. For objects, this is equivalent
+to invoking their undefine method. For arrays, hashes and other
+complex data, this might require emptying the structures associated
+with the object.
+
+In all cases, calling C on a variable
+should place the object in the same state as if it was just
+declared.
+
 =item eqv
 
  our Bool multi sub eqv (Ordering @by, $a, $b)
@@ -103,6 +160,21 @@
 
 =back
 
+=head1 Pattern
+
+ role  Pattern {
+ method ACCEPTS($self:, $other) {...}
+ method REJECTS($self:, $other) {...}
+ }
+
+=item ACCEPTS
+
+Used in smartmatching; see S03.  
+
+=item REJECTS
+
+Used in smartmatching; see S03.  
+
 =head1 Additions
 
 Please post errors and feedback to perl6-language.  If you are making

Modified: docs/Perl6/Spec/S32-setting-library/Scalar.pod
===
--- docs/Perl6/Spec/S32-setting-library/Scalar.pod  2009-03-05 03:54:17 UTC 
(rev 25697)
+++ docs/Perl6/Spec/S32-setting-library/Scalar.pod  2009-03-05 05:58:38 UTC 
(rev 25698)
@@ -33,38 +33,6 @@
 
 =over
 
-=item defined
-
-  our Bool multi defined ( Any $thing )
-  our Bool multi defined ( Any $thing, ::role )
-
-C returns true if the parameter has a value and that value is
-not the undefined value (per C), otherwise false is returned.
-
-Same as Perl 5, only takes extra optional argument to ask if value is defined
-with respect to a particular role:
-
-  defined($x, SomeRole);
-
-A value may be defined according to one role and undefined according to 
another.
-Without the extra argument, defaults to the definition of defined supplied by
-the type of the object.
-
-=item undefine
-
-  our multi undefine( Any $thing )
-
-Takes any variable as a parameter and attempts to "remove" its
-definition. For simple scalar variables this means assigning
-the undefined value to the variable. For objects, this is equivalent
-to invoking their undefine method. For arrays, hashes and other
-complex data, this might require emptying the structures associated
-with the object.
-
-In all cases, calling C on a variable
-should place the object in the same state as if it was just
-declared.
-
 =item undef
 
   constant Scalar Scalar::undef



r25699 - docs/Perl6/Spec

2009-03-04 Thread pugs-commits
Author: wayland
Date: 2009-03-05 07:16:44 +0100 (Thu, 05 Mar 2009)
New Revision: 25699

Modified:
   docs/Perl6/Spec/S02-bits.pod
   docs/Perl6/Spec/S28-special-names.pod
Log:
Changes to special variables as per "$?OS changes" discussion on mailing list.  
Haven't 
worried about compatibility for now, though.  


Modified: docs/Perl6/Spec/S02-bits.pod
===
--- docs/Perl6/Spec/S02-bits.pod2009-03-05 05:58:38 UTC (rev 25698)
+++ docs/Perl6/Spec/S02-bits.pod2009-03-05 06:16:44 UTC (rev 25699)
@@ -2127,7 +2127,7 @@
 
 The following return objects that contain all pertinent info:
 
-$?OSWhich operating system am I compiled for?
+$?KERNELWhich kernel am I compiled for?
 $?DISTROWhich OS distribution am I compiling under
 $?VMWhich virtual machine am I compiling under
 $?XVM   Which virtual machine am I cross-compiling for
@@ -2155,7 +2155,7 @@
 
 Note that some of these things have parallels in the C<*> space at run time:
 
-$*OSWhich OS I'm running under
+$*KERNELWhich kernel I'm running under
 $*DISTROWhich OS distribution I'm running under
 $*VMWhich VM I'm running under
 $*PERL  Which Perl I'm running under

Modified: docs/Perl6/Spec/S28-special-names.pod
===
--- docs/Perl6/Spec/S28-special-names.pod   2009-03-05 05:58:38 UTC (rev 
25698)
+++ docs/Perl6/Spec/S28-special-names.pod   2009-03-05 06:16:44 UTC (rev 
25699)
@@ -67,6 +67,8 @@
  $!S04# Current Exception object
  $/S05   Match# Last match
  $0, $1, $2S05   Str  # First captured value from match: $/[0]
+ $?ARCH  SoftwarePackage # Host architecture
+ $?XARCH SoftwarePackage # Target architecture 
  @*ARGSS06   Array of Str # command-line arguments
  $*ARGFILESS02   IO   # The magic command-line input handle
  &?BLOCK   S06   Block# current block (itself)
@@ -96,8 +98,8 @@
  $?MODULE  S02   Module   # current module
  %*OPTSS19   Hash of XXX  # Options from command line
  %*OPT...  S19   Hash of XXX  # Options from command line to be passed 
down
- $?OSSoftwarePackage # operating system compiled for
- $*OSSoftwarePackage # operating system running under
+ $?KERNELSoftwarePackage # operating system compiled for
+ $*KERNELSoftwarePackage # operating system running under
  $*OUT S16   IO   # Standard output handle
  $?PARSER  S02   Grammar  # Which Perl grammar was used to parse 
this statement?
  $?PACKAGE S02   Package  # current package
@@ -113,8 +115,8 @@
  $?SCOPE   S02# Current "my" scope (XXX unnecessary?)
  $*UID   Int  # system user id
  $?USAGE   S06   Str  # Default usage message generated at 
compile time
- $?VM  S02   Str  # Which virtual machine am I compiling 
under
- $?XVM S02   Str  # Which virtual machine am I 
cross-compiling for
+ $?VM  S02   SoftwarePackage # Which virtual machine am I 
compiling under
+ $?XVM S02   SoftwarePackage # Which virtual machine am I 
cross-compiling for
 
 Note that contextual variables such as C<$*OUT> may have more than
 one current definition in the outer dynamic context, in which case