On 2009-Aug-19, at 4:38 pm, Mark J. Reed wrote:
I don't think $file1.name == $file2.name should talk to the FS,
because I think File#name t+r whatever)  should return a plain Str.

I was thinking === rather than eq might be enough distinction, but you're right, confusion is too likely. Maybe $file1.name ~~ $file2.name? IO::Filesystem::compare- paths($file1, $file2) seems a tad wordy.

On 2009-Aug-19, at 7:06 pm, Timothy S. Nelson wrote:
Having said that, you've made me realise that $file1 == $file2 might be the perfect operator for comparing inodes, since inodes are numbers.

Isn't that a bit FS-specific? Since inodes are less commonly used, I wouldn't mind making their use more explicit: $f1.inode == $f1.inode. Or to be less FS-specific, $f1.id == $f2.id? Where .id could return an inode, an FSspec, whatever is suitable to that filesystem.

I should've mentioned, though, we're currently using the smartmatch operator for this, so I'm thinking maybe I'll just stick with that.

Or $f1.id ~~ $f2.id, since whatever identifier the FS uses might not be numeric, yes.


Reply via email to