dagolden / Path-Tiny

File path utility
41 stars 58 forks source link

[doc] Use Lexicals on Method Examples #257

Closed rwp0 closed 2 years ago

rwp0 commented 2 years ago

Use my on method usage examples for better practice declaring variables as lexicals.

Increment module version FWIW.

And also to be consistent throughout the documentation as with:

=method size, size_human
  my $p = path("foo");
xdg commented 2 years ago

I'm going to reject this. The purpose of documentation is clarity of use, not being copy-paste ready. I don't think my adds value and it actually makes blocks with repeated examples syntactically dubious, as the examples shown technically would warn like "my" variable $file masks earlier declaration.