Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@melo
Copy link
Contributor

@melo melo commented Apr 18, 2012

If the package in extends() fails to load (either because of a typo or a syntax error), Mo silently ignores this and keeps going. This changes make extends() propagate the error message that no PACKAGE () generates.

OTOH this makes inline classes (like those used on t/build.t and t/test.t) stop working because inline classes don't update %INC and so a follow up extends() in a child class would die with "Cannot find PACKAGE.pm".

We changed Mo::import() to update %INC if needed. This may have other consequences that I'm not thinking about right now. If so, please suggest an alternative to support inline classes, I will update my branch with it.

Signed-off-by: Pedro Melo [email protected]

We update %INC in Mo::import() for caller pkg, to cope with inline classes.

Signed-off-by: Pedro Melo <[email protected]>
@mlawren
Copy link

mlawren commented Nov 25, 2013

I just got bitten by this particular piece of behaviour. I don't know what the issue with the tests files is, but I find the lack of an exception on failure to load a parent class to be confusing, and a bug.

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