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.
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