mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-05 17:48:44 +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);
|
||||
|
||||
if ( keys %json > 0 ) {
|
||||
eval {
|
||||
use JSON;
|
||||
1;
|
||||
};
|
||||
eval "use JSON;";
|
||||
|
||||
unless ($@) {
|
||||
if ( !$@ ) {
|
||||
foreach ( keys %json ) {
|
||||
next
|
||||
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);
|
||||
}
|
||||
else {
|
||||
$@ = undef;
|
||||
}
|
||||
}
|
||||
|
||||
# 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
|
||||
if ( !defined( $modMeta->{prereqs} ) ) {
|
||||
eval {
|
||||
use Perl::PrereqScanner::NotQuiteLite;
|
||||
1;
|
||||
};
|
||||
eval "use Perl::PrereqScanner::NotQuiteLite;";
|
||||
|
||||
unless ($@) {
|
||||
if ( !$@ ) {
|
||||
my $scanner = Perl::PrereqScanner::NotQuiteLite->new(
|
||||
parsers => [qw/:installed -UniversalVersion/],
|
||||
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 {
|
||||
$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",
|
||||
"meta"
|
||||
],
|
||||
"version": "v0.1.0",
|
||||
"version": "v0.1.1",
|
||||
"release_status": "testing",
|
||||
"author": [
|
||||
"Julian Pawlowski <julian.pawlowski@gmail.com>"
|
||||
|
Loading…
x
Reference in New Issue
Block a user