Permalink
Browse files

added passthrough methods

  • Loading branch information...
1 parent 4159178 commit d8b2b11869e6103cfc9ad1aa33ca72a794541ef9 @FROGGS committed Sep 14, 2012
Showing with 109 additions and 21 deletions.
  1. +22 −4 lib/File/Spec/Cygwin.pm
  2. +22 −4 lib/File/Spec/Epoc.pm
  3. +22 −4 lib/File/Spec/OS2.pm
  4. +22 −4 lib/File/Spec/VMS.pm
  5. +21 −5 lib/File/Spec/Win32.pm
View
@@ -1,10 +1,28 @@
module File::Spec::Cygwin;
-role File::Spec::OS {
- method curdir {
- '.'
- }
+my $module = "File::Spec::Win32";
+require $module;
+
+class File::Spec::Cygwin {
+ method canonpath { ::($module).canonpath() }
+ method catdir { ::($module).catdir() }
+ method catfile { ::($module).catfile() }
+ method curdir { ::($module).curdir() }
+ method devnull { ::($module).devnull() }
+ method rootdir { ::($module).rootdir() }
+ method tmpdir { ::($module).tmpdir() }
+ method updir { ::($module).updir() }
+ method no_upwards { ::($module).no_upwards() }
+ method case_tolerant { ::($module).case_tolerant() }
+ method file_name_is_absolute { ::($module).file_name_is_absolute() }
+ method path { ::($module).path() }
+ method join { ::($module).join() }
+ method splitpath { ::($module).splitpath() }
+ method splitdir { ::($module).splitdir() }
+ method catpath { ::($module).catpath() }
+ method abs2rel { ::($module).abs2rel() }
+ method rel2ab { ::($module).rel2ab() }
}
1;
View
@@ -1,10 +1,28 @@
module File::Spec::Epoc;
-role File::Spec::OS {
- method curdir {
- '.'
- }
+my $module = "File::Spec::Unix";
+require $module;
+
+class File::Spec::Epoc {
+ method canonpath { ::($module).canonpath() }
+ method catdir { ::($module).catdir() }
+ method catfile { ::($module).catfile() }
+ method curdir { ::($module).curdir() }
+ method devnull { ::($module).devnull() }
+ method rootdir { ::($module).rootdir() }
+ method tmpdir { ::($module).tmpdir() }
+ method updir { ::($module).updir() }
+ method no_upwards { ::($module).no_upwards() }
+ method case_tolerant { ::($module).case_tolerant() }
+ method file_name_is_absolute { ::($module).file_name_is_absolute() }
+ method path { ::($module).path() }
+ method join { ::($module).join() }
+ method splitpath { ::($module).splitpath() }
+ method splitdir { ::($module).splitdir() }
+ method catpath { ::($module).catpath() }
+ method abs2rel { ::($module).abs2rel() }
+ method rel2ab { ::($module).rel2ab() }
}
1;
View
@@ -1,10 +1,28 @@
module File::Spec::OS2;
-role File::Spec::OS {
- method curdir {
- '.'
- }
+my $module = "File::Spec::Unix";
+require $module;
+
+class File::Spec::OS2 {
+ method canonpath { ::($module).canonpath() }
+ method catdir { ::($module).catdir() }
+ method catfile { ::($module).catfile() }
+ method curdir { ::($module).curdir() }
+ method devnull { ::($module).devnull() }
+ method rootdir { ::($module).rootdir() }
+ method tmpdir { ::($module).tmpdir() }
+ method updir { ::($module).updir() }
+ method no_upwards { ::($module).no_upwards() }
+ method case_tolerant { ::($module).case_tolerant() }
+ method file_name_is_absolute { ::($module).file_name_is_absolute() }
+ method path { ::($module).path() }
+ method join { ::($module).join() }
+ method splitpath { ::($module).splitpath() }
+ method splitdir { ::($module).splitdir() }
+ method catpath { ::($module).catpath() }
+ method abs2rel { ::($module).abs2rel() }
+ method rel2ab { ::($module).rel2ab() }
}
1;
View
@@ -1,10 +1,28 @@
module File::Spec::VMS;
-role File::Spec::OS {
- method curdir {
- '.'
- }
+my $module = "File::Spec::Unix";
+require $module;
+
+class File::Spec::VMS {
+ method canonpath { ::($module).canonpath() }
+ method catdir { ::($module).catdir() }
+ method catfile { ::($module).catfile() }
+ method curdir { ::($module).curdir() }
+ method devnull { ::($module).devnull() }
+ method rootdir { ::($module).rootdir() }
+ method tmpdir { ::($module).tmpdir() }
+ method updir { ::($module).updir() }
+ method no_upwards { ::($module).no_upwards() }
+ method case_tolerant { ::($module).case_tolerant() }
+ method file_name_is_absolute { ::($module).file_name_is_absolute() }
+ method path { ::($module).path() }
+ method join { ::($module).join() }
+ method splitpath { ::($module).splitpath() }
+ method splitdir { ::($module).splitdir() }
+ method catpath { ::($module).catpath() }
+ method abs2rel { ::($module).abs2rel() }
+ method rel2ab { ::($module).rel2ab() }
}
1;
View
@@ -1,13 +1,17 @@
module File::Spec::Win32;
-BEGIN require "File::Spec::Unix";
+my $module = "File::Spec::Unix";
+require $module;
-role File::Spec::OS {
- # use Unix as a base
- also does File::Spec::Unix;
+class File::Spec::Win32 {
+ method canonpath { ::($module).canonpath() }
+ method catdir { ::($module).catdir() }
+ method catfile { ::($module).catfile() }
+ method curdir { ::($module).curdir() }
+ method devnull { ::($module).devnull() }
+ method rootdir { ::($module).rootdir() }
- # and add Win32 specific stuff
my $tmpdir;
method tmpdir {
return $tmpdir if $tmpdir.defined;
@@ -22,6 +26,18 @@ role File::Spec::OS {
'/'
);
}
+
+ method updir { ::($module).updir() }
+ method no_upwards { ::($module).no_upwards() }
+ method case_tolerant { ::($module).case_tolerant() }
+ method file_name_is_absolute { ::($module).file_name_is_absolute() }
+ method path { ::($module).path() }
+ method join { ::($module).join() }
+ method splitpath { ::($module).splitpath() }
+ method splitdir { ::($module).splitdir() }
+ method catpath { ::($module).catpath() }
+ method abs2rel { ::($module).abs2rel() }
+ method rel2ab { ::($module).rel2ab() }
}
1;

0 comments on commit d8b2b11

Please sign in to comment.