| 1 | package IO::Die; | ||||||||||
| 2 | |||||||||||
| 3 | 7 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | |||||||||||
| 5 | 28 | ▶ | sub mkdir { | ||||||||
|
Subroutine
mkdir: called CC=4 SCAR=13.9
| |||||||||||
| 6 | 28 | my ( $NS, @args ) = @_; | |||||||||
| 7 | |||||||||||
| 8 | 28 | local ( $!, $^E ); | |||||||||
| 9 | |||||||||||
| 10 | 28 | my $ret; | |||||||||
| 11 | 28 | ▶ | if ( @args > 1 ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 12 | 7 | $ret = CORE::mkdir $args[0], $args[1]; | |||||||||
| 13 | } | ||||||||||
| 14 | else { | ||||||||||
| 15 | 21 | ▶ | if ( !@args ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | 7 | @args = ($_); | |||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | 21 | $ret = CORE::mkdir( $args[0] ); | |||||||||
| 20 | } | ||||||||||
| 21 | |||||||||||
| 22 | 28 | ▶ | if ( !$ret ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 23 | 7 | $NS->__THROW( 'DirectoryCreate', path => $args[0], mask => $args[1] ); | |||||||||
| 24 | } | ||||||||||
| 25 | |||||||||||
| 26 | 21 | return $ret; | |||||||||
| 27 | } | ||||||||||
| 28 | |||||||||||
| 29 | 7 | 1; | |||||||||