Front page | perl.perl6.language |
Postings from April 2009
r26090 - docs/Perl6/Spec
From:
pugs-commits
Date:
April 4, 2009 11:45
Subject:
r26090 - docs/Perl6/Spec
Message ID:
20090404184514.28867.qmail@feather.perl6.nl
Author: s1n
Date: 2009-04-04 20:45:14 +0200 (Sat, 04 Apr 2009)
New Revision: 26090
Modified:
docs/Perl6/Spec/S16-io.pod
Log:
[spec] minor touch-ups to better format the pod for perl5's perldoc tool.
Modified: docs/Perl6/Spec/S16-io.pod
===================================================================
--- docs/Perl6/Spec/S16-io.pod 2009-04-04 15:57:31 UTC (rev 26089)
+++ docs/Perl6/Spec/S16-io.pod 2009-04-04 18:45:14 UTC (rev 26090)
@@ -1,4 +1,3 @@
-
=encoding utf8
=head1 Title
@@ -62,8 +61,8 @@
syntax:
{
- temp $*OUT = open $newfile, :w;
- foo() # all stdout goes to $newfile
+ temp $*OUT = open $newfile, :w;
+ foo() # all stdout goes to $newfile
}
# stdout reverts to outer scope's definition
@@ -77,21 +76,23 @@
=head2 User role
-role User {
- has $username; # Username (some descendants(?) may want to implement a real $name)
- has $id; # User ID
- has $dir; # Home directory for files
-}
+ role User {
+ has $username; # Username (some descendants(?) may want to implement a real $name)
+ has $id; # User ID
+ has $dir; # Home directory for files
+ }
+=over
+
=item new
- method User new($Username?, $UID?) {...}
+ method User new($Username?, $UID?) {...}
Creates a new User object, fetching the information either by username or user ID.
=item write
- method write() {...}
+ method write() {...}
Tries to write the current User object to the user database. This may well fail.
@@ -103,50 +104,56 @@
When converted to a Num, returns $uid.
+=back
+
=head2 OS::Unix::User role
-role OS::Unix::User does User {
- has $password;
- has $gid;
- has $gecos;
- has $shell;
-}
+ role OS::Unix::User does User {
+ has $password;
+ has $gid;
+ has $gecos;
+ has $shell;
+ }
All the information is naturally fetched from the system via getpwuid, getpwnam, or the
like.
=head2 Group role
-role Group {
- has $name;
- has $id;
- has @members;
-}
+ role Group {
+ has $name;
+ has $id;
+ has @members;
+ }
+=over
+
=item new
- method Group new(:$Name, :$ID);
+ method Group new(:$Name, :$ID);
=item write
- method write();
+ method write();
Tries to write the group entry into the system group database.
-=head OS::Unix::NameServices role
+=back
+=head2 OS::Unix::NameServices role
+
The NameServices role has a bunch of functions that between them will return the whole
Name Services database between them, as lists of objects. The lists are specifically
intended to be lazy.
-role NameServices {
- method List of User users() {...} # getpwent, setpwent, endpwent
- method List of Group groups() {...} # getgrent, setgrent, endgrent
- method List of Service services() {...} # getservent, setservent, endservent
- method List of Protocol protocols() {...} # getprotoent, setprotoent, endprotoent
- method List of Network networks() {...} # getnetent, setnetent, endnetent
- method List of Host hosts() {...} # gethostent, sethostent, endhostent
-}
+ role NameServices {
+ method List of User users() {...} # getpwent, setpwent, endpwent
+ method List of Group groups() {...} # getgrent, setgrent, endgrent
+ method List of Service services() {...} # getservent, setservent, endservent
+ method List of Protocol protocols() {...} # getprotoent, setprotoent, endprotoent
+ method List of Network networks() {...} # getnetent, setnetent, endnetent
+ method List of Host hosts() {...} # gethostent, sethostent, endhostent
+ }
=head1 Additions
@@ -155,5 +162,4 @@
=cut
-=encoding utf8
-
+=for vim:set expandtab sw=4:
-
r26090 - docs/Perl6/Spec
by pugs-commits