-
Notifications
You must be signed in to change notification settings - Fork 11
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
Need path validation method #2
Comments
Hi Steffen I checked out your module yesterday and could not find a way to verify I expected Data::DPath::Path->new( path => '!"§$%&/()=') to throw an error but no Hmmm, they are normal paths, just looking a bit weird. The only thing that's missing is that DPath does not find values when Try attached test and see what I mean: prove -vl strange-paths.t Note how I split and nested the keys in $data according to the "/" in It only fails with the un-anchored paths. Besides that it works. Hi Steffen thanks for the elaborate answer. I have a web application where users can enter XPaths, Regular When I validate the users input all those modules provide the In the case of Data::DPath no such validation "phase" seems available. e.g. Data::DPath::Path. sub new { |
Thanks. Currently I try to allow "relative" paths by anchoring them to root Can you think of any other path examples which should actually be wrong? Otherwise my validate() function currently looks like always returning true... |
Hi David, I just rediscovered this issue. What's your current mindset on this? |
hey again, I seem to have missed your question some time ago. :) We could still use a validation method but I understand that it is not easy to implement. Even though paths might be very complex I suppose theyhave some kind of rule/grammar they follow. ps: we are using Data::DPath extensively and are very happy so far. |
It would be nice to have a validate() method to verify correctness
of incoming DPaths.
The text was updated successfully, but these errors were encountered: