While it is not very common to have $0 contain no
'/', it may happen on occasion (after all it happened to
me ;).
+2007-09-20 Frank Lichtenheld <djpig@debian.org>
+
+ * scripts/Dpkg.pm: Make the regex for determining
+ $progname more robust.
+
2007-09-18 Guillem Jover <guillem@debian.org>
* lib/mlib.c (checksubprocerr): Warn instead of erroring out in case
use base qw(Exporter);
our @EXPORT = qw($version $progname $admindir $dpkglibdir $pkgdatadir);
-our ($progname) = $0 =~ m:.*/(.*):;
+our ($progname) = $0 =~ m#(?:.*/)?([^/]*)#;
# The following lines are automatically fixed at install time
our $version = "1.14";