Re: question of what can respond to die [...]

2015-01-27 Thread Shawn H Corey
On Tue, 27 Jan 2015 09:37:15 -0500 Harry Putnam wrote: > #!/usr/local/src/test/bin/perl > > use strict; > use warnings; > use Cwd 'abs_path'; > > my $tdir = shift; > You can use `-e` to determine if the path exists and `-d` to determine if it's a directory. See `perldoc -f -X` and search for

Re: question of what can respond to die [...]

2015-01-27 Thread Shawn H Corey
On Tue, 27 Jan 2015 10:48:43 -0500 Brandon McCaig wrote: > It would not be very pleasant if most things die() on error because > errors are normal and usually we don't want robust programs to crash > when something innocent fails, nor do we want to have to wrap every > error that we can recover f

Re: question of what can respond to die [...]

2015-01-27 Thread Brandon McCaig
Harry: On Tue, Jan 27, 2015 at 9:37 AM, Harry Putnam wrote: > In the following code I hoped to use `use Cwd abs_path;' to not > only produce the absolute path for a named directory but to die if it > could not... thereby getting around having to test the named dir with > -d ... to make sure it w

question of what can respond to die [...]

2015-01-27 Thread Harry Putnam
In the following code I hoped to use `use Cwd abs_path;' to not only produce the absolute path for a named directory but to die if it could not... thereby getting around having to test the named dir with -d ... to make sure it was really a directory in the fs. It does not have that effect when a