# New Ticket Created by  William Orr 
# Please include the string:  [perl #84948]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=84948 >


Parrot introduced some changes which broke most of the functions in
IO::Stat. I fixed them, and added two new functions (isdev, islnk)
that parrot implemented.

This patch was also sent as a pull request on github.

-- 
-Will Orr
>From 57e34fc2d268134f992b72887acdfb72ec81768a Mon Sep 17 00:00:00 2001
From: William Orr <w...@worrbase.com>
Date: Fri, 25 Feb 2011 19:23:07 -0500
Subject: [PATCH] Fixed some stat bugs

- added isreg
- added islnk
- fixed all IO::Stat methods with intval > 2
---
 src/core/IO/Stat.pm |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/src/core/IO/Stat.pm b/src/core/IO/Stat.pm
index dba9c86..2578498 100644
--- a/src/core/IO/Stat.pm
+++ b/src/core/IO/Stat.pm
@@ -13,36 +13,44 @@ class IO::Stat {
         ?pir::stat__isi($.path, 2);
     }
 
-    method isdev {
+    method isreg {
         ?pir::stat__isi($.path, 3);
     }
 
+    method isdev {
+        ?pir::stat__isi($.path, 4);
+    }
+
     method createtime {
-        pir::stat__isi($.path, 4);
+        pir::stat__isi($.path, 5);
     }
 
     method accesstime {
-        pir::stat__isi($.path, 5);
+        pir::stat__isi($.path, 6);
     }
 
     method modifytime {
-        pir::stat__isi($.path, 6);
+        pir::stat__isi($.path, 7);
     }
 
     method changetime {
-        pir::stat__isi($.path, 7);
+        pir::stat__isi($.path, 8);
     }
 
     method backuptime {
-        pir::stat__isi($.path, 8);
+        pir::stat__isi($.path, 9);
     }
 
     method uid {
-        pir::stat__isi($.path, 9);
+        pir::stat__isi($.path, 10);
     }
 
     method gid {
-        pir::stat__isi($.path, 10);
+        pir::stat__isi($.path, 11);
+    }
+
+    method islnk {
+        ?pir::stat__isi($.path, 12);
     }
 }
 
-- 
1.7.4.1

Reply via email to