Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,8 @@ Makefile.old
MANIFEST.bak
OpenStack-*
.build
.env*
!.env.example
.DS_Store
.idea/
.vscode/
32 changes: 0 additions & 32 deletions .travis.yml

This file was deleted.

4 changes: 3 additions & 1 deletion lib/OpenStack/MetaAPI/API.pm
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ sub get_service {
my $pkg = ucfirst $name;
$pkg = __PACKAGE__ . "::$pkg";

eval qq{ require $pkg; 1 } or die "Failed to load $pkg: $@";
(my $file = $pkg) =~ s{::}{/}g;
$file .= '.pm';
eval { require $file; 1 } or die "Failed to load $pkg: $@";

delete $opts{name};

Expand Down
4 changes: 3 additions & 1 deletion lib/OpenStack/MetaAPI/API/Service.pm
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ sub BUILD_api_specs { # load specs
my $pkg =
'OpenStack::MetaAPI::API::Specs::' . ucfirst($self->name) . '::' . $v;

my $load = eval qq{ require $pkg; 1 };
(my $file = $pkg) =~ s{::}{/}g;
$file .= '.pm';
my $load = eval { require $file; 1 };
if ($load) {
return $pkg->new();
}
Expand Down
2 changes: 1 addition & 1 deletion lib/OpenStack/MetaAPI/Helpers/DataAsYaml.pm
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ sub LoadDataFrom {
my $data;
{
local $/;
my $fh = eval '\*' . $pkg . '::DATA';
my $fh = do { no strict 'refs'; \*{"${pkg}::DATA"} };
$data = <$fh>;
}

Expand Down
Loading