summaryrefslogtreecommitdiff
path: root/lib/SlackBuild
diff options
context:
space:
mode:
Diffstat (limited to 'lib/SlackBuild')
-rw-r--r--lib/SlackBuild/Request/Auto.pm6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/SlackBuild/Request/Auto.pm b/lib/SlackBuild/Request/Auto.pm
index 08832d6..576d39d 100644
--- a/lib/SlackBuild/Request/Auto.pm
+++ b/lib/SlackBuild/Request/Auto.pm
@@ -6,6 +6,7 @@ use File::Basename;
use File::Spec;
use Net::SBo;
use JSON;
+use YAML;
use Carp;
sub req {
@@ -17,7 +18,10 @@ sub req {
open(my $fd, $reqname) or croak "can't open file $reqname: $!";
my $string = <$fd>;
close $fd;
- return decode_json($string);
+ if ($string =~ /^\{/) {
+ return decode_json($string);
+ }
+ return YAML::Load($string);
}
if (-d $reqname) {

Return to:

Send suggestions and report system problems to the System administrator.