in reply to Automatic type conversion in a sub parameter causing a problem
Welcome to the Monastery, davebock!
I can get it to work after making a couple of slight changes (moving the oct() call to inside of the call to make_path(), and fixing your compile-time errors). First, replace:
my $usedMode = oct($Mode);
with:
my $usedMode = $mode;
then, replace:
make_path( $dirPathName, { mode => $usedMode, error => \$err ) );
with:
make_path( $dirPathName, { mode => oct($usedMode), error => \$err +} );
Note that you don't need the intermediary $usedMode variable... it can be refactored out, and you can simply use $mode instead.
-stevieb
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Automatic type conversion in a sub parameter causing a problem
by davebock (Initiate) on Oct 22, 2015 at 17:40 UTC | |
by stevieb (Canon) on Oct 22, 2015 at 17:43 UTC | |
by davebock (Initiate) on Oct 22, 2015 at 17:48 UTC | |
by davebock (Initiate) on Oct 22, 2015 at 17:51 UTC | |
by stevieb (Canon) on Oct 22, 2015 at 17:55 UTC |