Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUILDARGS breaks the catmandu CLI command #3

Open
netsensei opened this issue Dec 15, 2017 · 0 comments
Open

BUILDARGS breaks the catmandu CLI command #3

netsensei opened this issue Dec 15, 2017 · 0 comments

Comments

@netsensei
Copy link
Contributor

The CA.pm module contains this code:

sub BUILDARGS {
    my ($class, %args) = @_;

    my $field_list = delete $args{'field_list'};

    if ($field_list) {
        if (ref($field_list) eq 'ARRAY') {
            # If the module is called from another script
            $args{'_field_list'} = $field_list;
        } else {
            # If the module is called from a fix
            my @list = split(/,/, $field_list);
            my @fields = map { $_ =~ s/^\s+//; $_; } @list;
            $args{'_field_list'} = \@fields;
        }
    }
    return \%args;
}

But this actually breaks the command line option with this error on Perl 5.26.0

Reference found where even-sized list expected at /Users/matthiasvandermaesen/Workspace/Catmandu-CA/lib/Catmandu/Store/CA.pm line 22.
Oops! Missing required arguments: password, url, username at /Users/matthiasvandermaesen/.plenv/versions/5.26.0/lib/perl5/site_perl/5.26.0/Catmandu/Env.pm line 142.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant