--- Guard/Guard.pm 2008/12/13 18:43:01 1.6 +++ Guard/Guard.pm 2008/12/13 18:44:16 1.7 @@ -8,7 +8,7 @@ # temporarily chdir to "/etc" directory, but make sure # to go back to "/" no matter how myfun exits: - sub dosomething { + sub myfun { scope_guard { chdir "/" }; chdir "/etc";