From 6bd1ed902caf5beac68a83eef897f42767eb7562 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Wed, 23 May 2012 18:25:29 +0000 Subject: (cat_) sync with MDK::Common (but keep older error message) (perl_checker cleanups) --- rescue/tree/sbin/fakeshutdown | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'rescue') diff --git a/rescue/tree/sbin/fakeshutdown b/rescue/tree/sbin/fakeshutdown index cfc6df4dc..309f26c6c 100755 --- a/rescue/tree/sbin/fakeshutdown +++ b/rescue/tree/sbin/fakeshutdown @@ -13,7 +13,8 @@ # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # -sub cat_ { local *F; open F, $_[0] or die "cat of file $_[0] failed: $!\n"; my @l = ; wantarray ? @l : join '', @l } +# From MDK::Common: +sub cat_ { open(my $F, '<', $_[0]) or die "cat of file $_[0] failed: $!\n"; my @l = <$F>; wantarray() ? @l : join '', @l } print "\n"; -- cgit v1.2.1