r63678 - in /trunk/libapp-options-perl: CHANGES META.yml debian/changelog debian/copyright lib/App/Options.pm

jotamjr-guest at users.alioth.debian.org jotamjr-guest at users.alioth.debian.org
Wed Oct 13 15:11:37 UTC 2010


Author: jotamjr-guest
Date: Wed Oct 13 15:11:24 2010
New Revision: 63678

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=63678
Log:
* New upstream release
* Upstream included a coyright statement for the distribution

Modified:
    trunk/libapp-options-perl/CHANGES
    trunk/libapp-options-perl/META.yml
    trunk/libapp-options-perl/debian/changelog
    trunk/libapp-options-perl/debian/copyright
    trunk/libapp-options-perl/lib/App/Options.pm

Modified: trunk/libapp-options-perl/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-options-perl/CHANGES?rev=63678&op=diff
==============================================================================
--- trunk/libapp-options-perl/CHANGES (original)
+++ trunk/libapp-options-perl/CHANGES Wed Oct 13 15:11:24 2010
@@ -1,6 +1,13 @@
 #############################################################################
 # CHANGE LOG
 #############################################################################
+
+VERSION 1.12
+ x Added a copyright statement at the request of a Debian administrator.
+   https://rt.cpan.org/Public/Bug/Display.html?id=62017
+
+VERSION 1.11
+ x Added prefixadmin to the MANIFEST
 
 VERSION 1.1
  x Supports the "secure" option attribute. (Also, all options which end in "pass" or "password"

Modified: trunk/libapp-options-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-options-perl/META.yml?rev=63678&op=diff
==============================================================================
--- trunk/libapp-options-perl/META.yml (original)
+++ trunk/libapp-options-perl/META.yml Wed Oct 13 15:11:24 2010
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               App-Options
-version:            1.11
+version:            1.12
 abstract:           ~
 author:  []
 license:            unknown

Modified: trunk/libapp-options-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-options-perl/debian/changelog?rev=63678&op=diff
==============================================================================
--- trunk/libapp-options-perl/debian/changelog (original)
+++ trunk/libapp-options-perl/debian/changelog Wed Oct 13 15:11:24 2010
@@ -1,3 +1,10 @@
+libapp-options-perl (1.12-1) UNRELEASED; urgency=low
+
+  * New upstream release
+  * Upstream included a coyright statement for the distribution
+
+ -- Jotam Jr. Trejo <jotamjr at debian.org.sv>  Wed, 13 Oct 2010 08:00:35 -0600
+
 libapp-options-perl (1.11-1) unstable; urgency=low
 
   * New upstream release

Modified: trunk/libapp-options-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-options-perl/debian/copyright?rev=63678&op=diff
==============================================================================
--- trunk/libapp-options-perl/debian/copyright (original)
+++ trunk/libapp-options-perl/debian/copyright Wed Oct 13 15:11:24 2010
@@ -4,12 +4,7 @@
 Source: http://search.cpan.org/dist/App-Options/
 
 Files: *
-Comment: At this time (version 1.11) there is no explicit copyright statement,
- under the Berne convention it is assumed that the authors are also the
- copyright holders, there is also a request in RT CPAN for the inclusion of a
- copyright statement in a new release.
-Copyright: 2010, Stephen Adkins <spadkins at gmail.com>, at this time
- version 1.11 the distribution does'nt have a
+Copyright: 2010, Stephen Adkins <spadkins at gmail.com>
 License: Artistic or GPL-1+
 
 Files: debian/*

Modified: trunk/libapp-options-perl/lib/App/Options.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libapp-options-perl/lib/App/Options.pm?rev=63678&op=diff
==============================================================================
--- trunk/libapp-options-perl/lib/App/Options.pm (original)
+++ trunk/libapp-options-perl/lib/App/Options.pm Wed Oct 13 15:11:24 2010
@@ -1,6 +1,6 @@
 
 #############################################################################
-## $Id: Options.pm 14348 2010-08-28 21:37:13Z spadkins $
+## $Id: Options.pm 14478 2010-10-12 15:49:12Z spadkins $
 #############################################################################
 
 package App::Options;
@@ -14,7 +14,7 @@
 use File::Spec;
 use Config;
 
-$VERSION = "1.11";
+$VERSION = "1.12";
 
 =head1 NAME
 
@@ -532,7 +532,6 @@
     my $prefix_origin = "command line";
 
     # it can be set in environment.
-    # This is the preferred way for Registry and PerlRun webapps.
     if (!$prefix && $ENV{PREFIX}) {
         $prefix = $ENV{PREFIX};
         $prefix_origin = "environment";
@@ -572,28 +571,7 @@
     my $app = $values->{app};
     my $app_origin = "command line";
     if (!$app) {
-        my $path_info = $ENV{PATH_INFO} || "";
-        $path_info =~ s!/+$!!;    # strip off trailing slashes ("/")
-        if ($path_info && $path_info =~ m!^/([^/]+)!) {
-            my $path_info_app = $1;  # first part of PATH_INFO (without slashes)
-            if ($ENV{HOME} && -f "$ENV{HOME}/.app/$path_info_app.conf") {
-                $app = $path_info_app;
-                $app_origin = "PATH_INFO=$path_info matches $ENV{HOME}/.app/$path_info_app.conf";
-            }
-            elsif (-f "$prog_dir/$path_info_app.conf") {
-                $app = $path_info_app;
-                $app_origin = "PATH_INFO=$path_info matches $prog_dir/$path_info_app.conf";
-            }
-            elsif (-f "$prefix/etc/app/$path_info_app.conf") {
-                $app = $path_info_app;
-                $app_origin = "PATH_INFO=$path_info matches $prefix/etc/app/$path_info_app.conf";
-            }
-        }
-        if (!$app) {
-            $app = $prog_file;    # start with the full program name
-            $app =~ s/\.[^.]+$//; # strip off trailing file type (i.e. ".pl")
-            $app_origin = "program name ($0)";
-        }
+        ($app, $app_origin) = App::Options->determine_app($prefix, $prog_dir, $prog_file, $ENV{PATH_INFO}, $ENV{HOME});
         $values->{app} = $app;
     }
     print STDERR "4. Set app variable. app=[$app] origin=[$app_origin]\n" if ($debug_options);
@@ -966,6 +944,40 @@
             App::Options->print_usage($values, $init_args);
         }
         exit($exit_status);
+    }
+}
+
+# ($app, $app_origin) = App::Options->determine_app($prefix, $prog_dir, $prog_file, $ENV{PATH_INFO}, $ENV{HOME});
+sub determine_app {
+    my ($class, $prefix, $prog_dir, $prog_file, $path_info, $home_dir) = @_;
+    my ($app, $app_origin);
+    $path_info ||= "";
+    $path_info =~ s!/+$!!;    # strip off trailing slashes ("/")
+    if ($path_info && $path_info =~ m!^/([^/]+)!) {
+        my $path_info_app = $1;  # first part of PATH_INFO (without slashes)
+        if ($home_dir && -f "$home_dir/.app/$path_info_app.conf") {
+            $app = $path_info_app;
+            $app_origin = "PATH_INFO=$path_info matches $home_dir/.app/$path_info_app.conf";
+        }
+        elsif (-f "$prog_dir/$path_info_app.conf") {
+            $app = $path_info_app;
+            $app_origin = "PATH_INFO=$path_info matches $prog_dir/$path_info_app.conf";
+        }
+        elsif (-f "$prefix/etc/app/$path_info_app.conf") {
+            $app = $path_info_app;
+            $app_origin = "PATH_INFO=$path_info matches $prefix/etc/app/$path_info_app.conf";
+        }
+    }
+    if (!$app) {
+        $app = $prog_file;    # start with the full program name
+        $app =~ s/\.[^.]+$//; # strip off trailing file type (i.e. ".pl")
+        $app_origin = "program name ($0)";
+    }
+    if (wantarray) {
+        return($app, $app_origin);
+    }
+    else {
+        return($app);
     }
 }
 
@@ -1782,7 +1794,7 @@
 
  #!/usr/bin/perl
  BEGIN {
-   $VERSION = do { my @r=(q$Revision: 14348 $=~/\d+/g); sprintf "%d."."%02d"x$#r, at r};
+   $VERSION = do { my @r=(q$Revision: 14478 $=~/\d+/g); sprintf "%d."."%02d"x$#r, at r};
  }
  use App::Options;
 
@@ -2176,6 +2188,7 @@
 
 =head1 ACKNOWLEDGEMENTS
 
+ * (c) 2010 Stephen Adkins
  * Author:  Stephen Adkins <spadkins at gmail.com>
  * License: This is free software. It is licensed under the same terms as Perl itself.
 




More information about the Pkg-perl-cvs-commits mailing list