You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This may be irrelevant, considering the list is later sorted by desired publication date, but in the posts builder, this line appears:
sort { $a->basename cmp $b->basename }
In context, $a and $b are Path::Class::File objects and one might expect basename to return the filename without an extension here. However, it does not. The extension is still present.
Using the venerable File::Basename::basename routine allows the caller to provide a list extensions to be stripped out of the returned file name. However, Path::Class::File::basename does not appear to take extensions as arguments to strip off, which is surprising.
Ultimately, the list of posts is sorted by the desired publication date, which Plerd::Post calculates.
Frankly, I would suggest removing the file sort as it appears do work that is ultimately thrown away.
Marking this as an enhancement because it does not really cause problems in the project. This is sort of "it would be nice to fix for pendantry" issue.
The text was updated successfully, but these errors were encountered:
This may be irrelevant, considering the list is later sorted by desired publication date, but in the posts builder, this line appears:
In context, $a and $b are Path::Class::File objects and one might expect basename to return the filename without an extension here. However, it does not. The extension is still present.
Using the venerable File::Basename::basename routine allows the caller to provide a list extensions to be stripped out of the returned file name. However, Path::Class::File::basename does not appear to take extensions as arguments to strip off, which is surprising.
Ultimately, the list of posts is sorted by the desired publication date, which Plerd::Post calculates.
Frankly, I would suggest removing the file sort as it appears do work that is ultimately thrown away.
Marking this as an enhancement because it does not really cause problems in the project. This is sort of "it would be nice to fix for pendantry" issue.
The text was updated successfully, but these errors were encountered: