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

`get_declared_prefixes` should notify user if `push_context` hasn't been used #11

merged 3 commits into from Jan 28, 2015


None yet
2 participants

paultcochrane commented Jan 4, 2015

In RT#2346 a user issue is mentioned whereby calling push_context() before calling get_declared_prefixes() can be overlooked leading to a "Can't use an undefined value as an ARRAY reference" error. This PR documents the required behaviour and ensures that the module informs the user that the required call has been missed should get_declared_prefixes() be called without having pushed a context onto the stack with push_context(). This PR should therefore close the issue raised in RT#2346.

paultcochrane added some commits Jan 4, 2015

Throwing error in get_declared_prefixes() if no context available
Something like the error message implemented here is what was discussed in
RT#2346.  I'm fairly sure that die()-ing here is the right thing to do,
since the code raised an error anyway (Can't use an undefined value as an
ARRAY reference).  Now the module is more informative as to what is wrong
and how the (user) issue should be fixed.
Documenting calling push_context() before calling get_declared_prefix…

This is one requirement mentioned in RT#2346: that it should be documented
that push_context() be called before using get_declared_prefixes().
Adding a test for new get_declared_prefixes() behaviour
This test checks the desired behaviour mentioned in RT#2346.

perigrin added a commit that referenced this pull request Jan 28, 2015

Merge pull request #11 from paultcochrane/pr/get_declared_prefixes_issue
`get_declared_prefixes` should notify user if `push_context` hasn't been used

@perigrin perigrin merged commit c4c3359 into perigrin:master Jan 28, 2015

@paultcochrane paultcochrane deleted the paultcochrane:pr/get_declared_prefixes_issue branch Jan 4, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment