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

Fix to avoid "uninitialized" warnings on stdout/stderr #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix to avoid "uninitialized" warnings on stdout/stderr #6

wants to merge 1 commit into from

Conversation

hoppfrosch
Copy link

Within catalyst debug-panel occurs the following error

Use of uninitialized value in repeat (x)
        at Catalyst::Controller::Swagger::api_docs(C:/perl/site/lib/Catalyst/Controller/Swagger.pm:48)

This bugfix avoids this warnings

@@ -46,8 +46,8 @@ sub api_docs : Local {
my @path;
for my $chain_part (@{$expanded->chain}) {
push @path, join('/',$chain_part->attributes->{PathPart}[0],
($chain_part->attributes->{CaptureArgs} ? join('/',('*') x $chain_part->attributes->{CaptureArgs}[0]) : ()),
($chain_part->attributes->{Args} ? join('/',('*') x $chain_part->attributes->{Args}[0]) : ()),
($chain_part->attributes->{CaptureArgs}[0] ? join('/',('*') x $chain_part->attributes->{CaptureArgs}[0]) : ()),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we should check ref eq 'ARRAY' here? Or if something has changed in Catalyst that would make these warnings surface.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just made it work without warning. You're right: it's not the best solution ...

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

Successfully merging this pull request may close these issues.

2 participants