Skip to content

Conversation

van-de-bugger
Copy link

@van-de-bugger van-de-bugger commented Oct 22, 2015

PPI::Document constructor creates an object either from string or from file. However, even if object was created from a file, created object does not know name of the file it was created from. It makes error reporting difficult.

Code changed to let constructor save filename for latter use. BTW, filename constructor attribute introduced. It allows to specify filename even if an object is creating from a string. It may be useful if caller code reads file and creates PPI document from a string.

Test added. All the tests (including the new one) pass on my system.

See also: #180

from file. However, even if object was created from a file, created
object does not know name of the file it was created from. It makes
error reporting difficult.

Code changed to let constructor save filename for latter use. BTW,
filename attribute introduced. It allows to specify filename even
if an object was created from a string. It may be useful if caller
code reads file and creates PPI document from a string.

See also: Perl-Critic#180
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.

1 participant