Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
aix-pm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Gerhard Gonter
aix-pm
Commits
196506b7
Commit
196506b7
authored
1 month ago
by
Gerhard Gonter
Browse files
Options
Downloads
Patches
Plain Diff
added indication if XML file cache was used
parent
56395fe3
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/util/Util/XML/File.pm
+5
-5
5 additions, 5 deletions
modules/util/Util/XML/File.pm
with
5 additions
and
5 deletions
modules/util/Util/XML/File.pm
+
5
−
5
View file @
196506b7
...
...
@@ -41,10 +41,10 @@ print __FILE__, ' ', __LINE__, " cache: mtime=$st[9] max_age=$max_age use=$use_c
while
(
<
FI
>
)
{
$xml
.=
$_
};
close
(
FI
);
$xmlref
=
XMLin
(
$xml
,
ForceContent
=>
1
,
ForceArray
=>
1
);
$xmlref
=
XMLin
(
$xml
,
ForceContent
=>
1
,
ForceArray
=>
1
,
KeyAttr
=>
[
]
);
# TODO: if the file is not ok, ignore the cached file and refetch
return
(
$xmlref
,
$xml
);
return
(
$xmlref
,
$xml
,
1
);
}
print
__LINE__
,
"
fetch_xml_file: url=[
$url
]
\n
";
...
...
@@ -52,7 +52,7 @@ print __FILE__, ' ', __LINE__, " cache: mtime=$st[9] max_age=$max_age use=$use_c
unless
(
$res
->
is_success
)
{
print
"
ERROR:
Aleph-XML-Query (find)
failed:
",
$res
->
status_line
,
"
\n
";
print
"
ERROR:
XML retrieval
failed:
",
$res
->
status_line
,
"
\n
";
return
undef
;
}
...
...
@@ -74,10 +74,10 @@ print __LINE__, " fetch: xml=[$xml]\n" if ($DEBUG > 0);
# TODO: else report that we can not write to the cache as we should
}
$xmlref
=
XMLin
(
$xml
,
ForceContent
=>
1
,
ForceArray
=>
1
,
KeyAttr
=>
[
]
);
$xmlref
=
XMLin
(
$xml
,
ForceContent
=>
1
,
ForceArray
=>
1
,
KeyAttr
=>
[
]);
print
__LINE__
,
"
xmlref:
",
main::
Dumper
(
$xmlref
)
if
(
$DEBUG
>
0
);
return
(
$xmlref
,
$xml
);
return
(
$xmlref
,
$xml
,
0
);
}
sub
save
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment