Change 17839 by [EMAIL PROTECTED] on 2002/09/04 13:47:12

        Subject: Re: [PATCH 5.8.0] add accessors for POSIX::SigAction
        From: "Brendan O'Dea" <[EMAIL PROTECTED]>
        Date: Wed, 4 Sep 2002 02:36:10 +1000
        Message-ID: <[EMAIL PROTECTED]>

Affected files ...

.... //depot/perl/ext/POSIX/POSIX.pm#30 edit
.... //depot/perl/ext/POSIX/POSIX.pod#29 edit

Differences ...

==== //depot/perl/ext/POSIX/POSIX.pm#30 (text) ====
Index: perl/ext/POSIX/POSIX.pm
--- perl/ext/POSIX/POSIX.pm#29~16752~   Thu May 23 09:04:15 2002
+++ perl/ext/POSIX/POSIX.pm     Wed Sep  4 06:47:12 2002
@@ -51,9 +51,12 @@
     goto &$AUTOLOAD;
 }
 
-sub POSIX::SigAction::new {
-    bless {HANDLER => $_[1], MASK => $_[2], FLAGS => $_[3] || 0}, $_[0];
-}
+package POSIX::SigAction;
+
+use AutoLoader 'AUTOLOAD';
+sub new { bless {HANDLER => $_[1], MASK => $_[2], FLAGS => $_[3] || 0}, $_[0] }
+
+package POSIX;
 
 1;
 __END__
@@ -948,3 +951,9 @@
 
 require Exporter;
 }
+
+package POSIX::SigAction;
+
+sub handler { $_[0]->{HANDLER} = $_[1] if @_ > 1; $_[0]->{HANDLER} };
+sub mask    { $_[0]->{MASK}    = $_[1] if @_ > 1; $_[0]->{MASK} };
+sub flags   { $_[0]->{FLAGS}   = $_[1] if @_ > 1; $_[0]->{FLAGS} };

==== //depot/perl/ext/POSIX/POSIX.pod#29 (text) ====
Index: perl/ext/POSIX/POSIX.pod
--- perl/ext/POSIX/POSIX.pod#28~17323~  Thu Jun 20 05:36:20 2002
+++ perl/ext/POSIX/POSIX.pod    Wed Sep  4 06:47:12 2002
@@ -1594,6 +1594,21 @@
 
 =back
 
+=over 8
+
+=item handler
+
+=item mask
+
+=item flags
+
+accessor functions to get/set the values of a SigAction object.
+
+       $sigset = $sigaction->mask;
+       $sigaction->flags(&POSIX::SA_RESTART);
+
+=back
+
 =head2 POSIX::SigSet
 
 =over 8
End of Patch.

Reply via email to