From: Chris Nehren Date: Sun, 4 Sep 2011 04:29:42 +0000 (-0400) Subject: Use FindBin so we don't need the bin_root silliness X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=1beca6d0d1a94ccf3d89db922f34493aaf05a971;p=p5sagit%2FPromulger.git Use FindBin so we don't need the bin_root silliness --- diff --git a/lib/Promulger.pm b/lib/Promulger.pm index dd1657f..af77ebf 100644 --- a/lib/Promulger.pm +++ b/lib/Promulger.pm @@ -15,7 +15,6 @@ Promulger -- Simple, Unixy mailing list manager # In a config file somewhere: aliases = /path/to/etc/aliases list_home = /path/your/mta/can/write/to/lists - bin_root = /path/to/pmg/bin # like /usr/local/bin # then /path/to/pmg/bin/pmg -c /path/to/config/pmg.conf newlist mylist diff --git a/lib/Promulger/List.pm b/lib/Promulger/List.pm index ad79fbf..025b87d 100644 --- a/lib/Promulger/List.pm +++ b/lib/Promulger/List.pm @@ -9,6 +9,7 @@ use Tie::File; use File::Slurp qw/read_file write_file/; use Data::Dumper; use Try::Tiny; +use FindBin qw($Bin); $Data::Dumper::Purity = 1; use Promulger::Config; @@ -84,7 +85,7 @@ sub setup { croak "${list_alias} already in $config->{aliases}"; } push @aliases, - qq(${list_alias}: "|$config->{bin_root}/pmg msg -c $config->{config_file}"\n); + qq(${list_alias}: "|$Bin msg -c $config->{config_file}"\n); } $self->store($path->stringify);