1 package Git::SVN::Utils;
8 our @EXPORT_OK = qw(fatal can_compress);
13 Git::SVN::Utils - utility functions used across Git::SVN
17 use Git::SVN::Utils qw(functions to import);
21 This module contains functions which are useful across many different
22 parts of Git::SVN. Mostly it's a place to put utility functions
23 rather than duplicate the code or have classes grabbing at other
28 All functions can be imported only on request.
34 Display a message and exit with a fatal error code.
38 # Note: not certain why this is in use instead of die. Probably because
39 # the exit code of die is 255? Doesn't appear to be used consistently.
40 sub fatal (@) { print STDERR "@_\n"; exit 1 }
45 my $can_compress = can_compress;
47 Returns true if Compress::Zlib is available, false otherwise.
53 return $can_compress if defined $can_compress;
55 return $can_compress = eval { require Compress::Zlib; };