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

Move Magpie::Constants to Sub::Exporter #6

Merged
merged 1 commit into from
Mar 3, 2013

Conversation

perigrin
Copy link
Member

@perigrin perigrin commented Mar 3, 2013

Magpie::Constants was DIYing an Exporter unneccessarily. This fixes it
to use Sub::Exporter which is already brought in by Moose. This should
close bug #1 reported by tobyink.

Additionally we use some of the more advanced Sub::Exporter features to
allow adding custom HTTP methods beyond the core set defined by the
W3C/IETF.

use Magpie::Constants extra_http_methods => [qw(FOO BAR BAZ)] };

or

use Magpie::Constants  HTTP_METHODS => {
                            extra_http_methods => [qw(FOO BAR BAZ)]
                        };

Should both now work. This closes bug #4 reported by tobyink.

Tests are left as a lemma for the reader (currently).

Magpie::Constants was DIYing an Exporter unneccessarily. This fixes it
to use Sub::Exporter which is already brought in by Moose. This should
close bug #1 reported by tobyink.

Additionally we use some of the more advanced Sub::Exporter features to
allow adding custom HTTP methods beyond the core set defined by the
W3C/IETF.

    use Magpie::Constants extra_http_methods => [qw(FOO BAR BAZ)] };

or

    use Magpie::Constants  HTTP_METHODS => {
                                extra_http_methods => [qw(FOO BAR BAZ)]
                            };

Should both now work. This closes bug #4 reported by tobyink.

Tests are left as a lemma for the reader (currently).
ubu added a commit that referenced this pull request Mar 3, 2013
Move Magpie::Constants to Sub::Exporter
@ubu ubu merged commit 22b9521 into master Mar 3, 2013
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