While it is not very common to have $0 contain no '/', it may happen on occasion (after all it happened to me ;).
@@ -1,3 +1,8 @@
+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
@@ -6,7 +6,7 @@ use warnings;
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";