Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Pass any extra .new parameter on through
  • Loading branch information
lizmat committed Nov 30, 2014
1 parent 0bdd9f3 commit 8c062d1
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/core/IOU.pm
Expand Up @@ -5,9 +5,9 @@ my class IOU {
has $!that;

submethod BUILD(:$!this,:$!abspath) { }
method new($this, :$CWD = $*CWD) {
method new($this, :$CWD = $*CWD, |c) {
my $abspath := MAKE-ABSOLUTE-PATH($this,$CWD);
self!what($abspath) # either the IO::Local object
self!what($abspath,|c) # either the IO::Local object
// self.bless(:$this,:$abspath); # or a placeholder
}

Expand Down Expand Up @@ -80,16 +80,16 @@ my class IOU {
);
}

method !what(IOU: $abspath) {
method !what(IOU: $abspath, |c) {
if FILETEST-E($abspath) {
if FILETEST-F($abspath) {
return IO::File.new(:$abspath);
return IO::File.new(:$abspath, |c);
}
elsif FILETEST-D($abspath) {
return IO::Dir.new(:$abspath);
return IO::Dir.new(:$abspath, |c);
}
elsif FILETEST-L($abspath) {
return IO::Link.new(:$abspath);
return IO::Link.new(:$abspath, |c);
}
}
Mu;
Expand Down

0 comments on commit 8c062d1

Please sign in to comment.