Author: ericwilhelm
Date: Sun Sep 28 02:30:16 2008
New Revision: 11893

Modified:
   Module-Build/trunk/Changes
   Module-Build/trunk/lib/Module/Build/API.pod
   Module-Build/trunk/lib/Module/Build/Version.pm

Log:
** applying version.pm update from John **
lib/Module/Build/Version.pm - 0.76 now
lib/Module/Build/API.pod    - dist_version_from note
Changes                     - update


Modified: Module-Build/trunk/Changes
==============================================================================
--- Module-Build/trunk/Changes  (original)
+++ Module-Build/trunk/Changes  Sun Sep 28 02:30:16 2008
@@ -2,7 +2,8 @@
 
 0.30_01
 
-   -
+ - Updated our embedded version.pm to 0.76, enhanced documentation on
+   dist_version_from.  [John Peacock]
 
 0.30 - Thu Sep 25 20:57:36 2008
 

Modified: Module-Build/trunk/lib/Module/Build/API.pod
==============================================================================
--- Module-Build/trunk/lib/Module/Build/API.pod (original)
+++ Module-Build/trunk/lib/Module/Build/API.pod Sun Sep 28 02:30:16 2008
@@ -268,6 +268,10 @@
 this process, so there's no real opportunity to change to something
 better.
 
+If the target file of L</dist_version_from> contains more than one package
+declaration, the version returned will be the one matching the configured
+L</module_name>.
+
 =item dynamic_config
 
 [version 0.07]

Modified: Module-Build/trunk/lib/Module/Build/Version.pm
==============================================================================
--- Module-Build/trunk/lib/Module/Build/Version.pm      (original)
+++ Module-Build/trunk/lib/Module/Build/Version.pm      Sun Sep 28 02:30:16 2008
@@ -74,7 +74,7 @@
 
 use locale;
 use vars qw ($VERSION @ISA @REGEXS);
-$VERSION = 0.74;
+$VERSION = 0.76;
 
 push @REGEXS, qr/
        ^v?     # optional leading 'v'
@@ -426,7 +426,11 @@
        require Carp;
        Carp::croak("Invalid version object");
     }
-    return $self->{original};
+    return exists $self->{original} 
+       ? $self->{original} 
+       : exists $self->{qv} 
+           ? $self->normal
+           : $self->numify;
 }
 
 sub vcmp
@@ -557,7 +561,8 @@
 # Thanks to Yitzchak Scott-Thoennes for this mode of operation
 {
     local $^W;
-    *UNIVERSAL::VERSION = sub {
+    *UNIVERSAL::VERSION # Module::Build::ModuleInfo doesn't see this now
+      = sub {
        my ($obj, $req) = @_;
        my $class = ref($obj) || $obj;
 

Reply via email to