From 76c2e0d02d07a09eb3d16e5a5251d0814354c5d4 Mon Sep 17 00:00:00 2001 From: "H.Merijn Brand" Date: Mon, 30 Mar 2009 11:13:39 +0200 Subject: [PATCH] Don't edit the same file in two sessions at the same time --- V.pm | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/V.pm b/V.pm index a6e81b6..367720e 100644 --- a/V.pm +++ b/V.pm @@ -141,11 +141,12 @@ sub _make_derived { my $conf = shift; - exists $conf->{config}{Off_t} + exists $conf->{config}{Off_t} and $conf->{derived}{Off_t} = delete $conf->{config}{Off_t}; exists $conf->{derived}{Off_t} && !exists $conf->{config}{lseektype} and $conf->{config}{lseektype} = $conf->{derived}{Off_t}; + $conf; } # _make_derived sub plv2hash @@ -174,12 +175,13 @@ sub plv2hash } my $build = { %empty_build }; $build->{osname} = $config{osname}; - return { + return _make_derived ({ build => $build, environment => {}, config => \%config, + derived => {}, inc => [], - }; + }); } # plv2hash sub myconfig @@ -209,12 +211,13 @@ sub myconfig my %config = map { $_ => $Config{$_} } @config_vars; - return { + return _make_derived ({ build => $build, environment => \%env, config => \%config, + derived => {}, inc => \@INC, - }; + }); } # myconfig 1; @@ -284,7 +287,7 @@ or This information is not available anywhere else, including C<%Config>, but it is the information that is only known to the perl binary. -The extracted information is stored in 4 entries in the C hash: +The extracted information is stored in 5 entries in the C hash: =over 4 @@ -305,6 +308,13 @@ value is 0. This is a hash with all the known defines as keys. The value is either 0, which means unknown or unset, or 1, which means defined. +=item derived + +As some verables are reported by a different name in the output of C +than their actual name in C<%Config>, I decided to leave the C entry +as close to reality as possible, and put in the entries that might have been +guessed by the printed output in a seperate block. + =item patches This is a list of optionally locally applied patches. Default is an empty list. @@ -359,7 +369,7 @@ H.Merijn Brand =head1 COPYRIGHT AND LICENSE -Copyright (C) 1999-2009 H.Merijn Brand +Copyright (C) 2009 H.Merijn Brand This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. -- 2.11.4.GIT