File tests 

if ( $path->exists )  { ... }

if ( $path->is_file ) { ... }

if ( $path->is_dir )  { ... }

my $stat = $path->stat;