mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-06 12:18:46 +00:00
Meta.pm: fix error handling
git-svn-id: https://svn.fhem.de/fhem/trunk@18741 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
c0e596a808
commit
646d80c965
@ -480,12 +480,9 @@ m/(^#\s+(?:\d{1,2}\.\d{1,2}\.(?:\d{2}|\d{4})\s+)?[^v\d]*(v?(?:\d{1,3}\.\d{1,3}(?
|
|||||||
$encoding = 'latin1' unless ($encoding);
|
$encoding = 'latin1' unless ($encoding);
|
||||||
|
|
||||||
if ( keys %json > 0 ) {
|
if ( keys %json > 0 ) {
|
||||||
eval {
|
eval "use JSON;";
|
||||||
use JSON;
|
|
||||||
1;
|
|
||||||
};
|
|
||||||
|
|
||||||
unless ($@) {
|
if ( !$@ ) {
|
||||||
foreach ( keys %json ) {
|
foreach ( keys %json ) {
|
||||||
next
|
next
|
||||||
if (
|
if (
|
||||||
@ -530,6 +527,9 @@ m/(^#\s+(?:\d{1,2}\.\d{1,2}\.(?:\d{2}|\d{4})\s+)?[^v\d]*(v?(?:\d{1,3}\.\d{1,3}(?
|
|||||||
}
|
}
|
||||||
return undef if ($metaSection);
|
return undef if ($metaSection);
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$@ = undef;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
# special place for fhem.pl is this module file
|
# special place for fhem.pl is this module file
|
||||||
@ -545,12 +545,9 @@ m/(^#\s+(?:\d{1,2}\.\d{1,2}\.(?:\d{2}|\d{4})\s+)?[^v\d]*(v?(?:\d{1,3}\.\d{1,3}(?
|
|||||||
|
|
||||||
# Detect prereqs if not provided via META.json
|
# Detect prereqs if not provided via META.json
|
||||||
if ( !defined( $modMeta->{prereqs} ) ) {
|
if ( !defined( $modMeta->{prereqs} ) ) {
|
||||||
eval {
|
eval "use Perl::PrereqScanner::NotQuiteLite;";
|
||||||
use Perl::PrereqScanner::NotQuiteLite;
|
|
||||||
1;
|
|
||||||
};
|
|
||||||
|
|
||||||
unless ($@) {
|
if ( !$@ ) {
|
||||||
my $scanner = Perl::PrereqScanner::NotQuiteLite->new(
|
my $scanner = Perl::PrereqScanner::NotQuiteLite->new(
|
||||||
parsers => [qw/:installed -UniversalVersion/],
|
parsers => [qw/:installed -UniversalVersion/],
|
||||||
suggests => 1,
|
suggests => 1,
|
||||||
@ -613,6 +610,9 @@ m/(^#\s+(?:\d{1,2}\.\d{1,2}\.(?:\d{2}|\d{4})\s+)?[^v\d]*(v?(?:\d{1,3}\.\d{1,3}(?
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
|
$@ = undef;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$modMeta->{x_prereqs_src} = 'META.json';
|
$modMeta->{x_prereqs_src} = 'META.json';
|
||||||
@ -857,7 +857,7 @@ m/(^#\s+(?:\d{1,2}\.\d{1,2}\.(?:\d{2}|\d{4})\s+)?[^v\d]*(v?(?:\d{1,3}\.\d{1,3}(?
|
|||||||
"metadata",
|
"metadata",
|
||||||
"meta"
|
"meta"
|
||||||
],
|
],
|
||||||
"version": "v0.1.0",
|
"version": "v0.1.1",
|
||||||
"release_status": "testing",
|
"release_status": "testing",
|
||||||
"author": [
|
"author": [
|
||||||
"Julian Pawlowski <julian.pawlowski@gmail.com>"
|
"Julian Pawlowski <julian.pawlowski@gmail.com>"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user