Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Mac-Path-Util CPAN distribution.

Report information
The Basics
Id: 1833
Status: resolved
Priority: 0/
Queue: Mac-Path-Util

People
Owner: Nobody in particular
Requestors: pudge [...] pobox.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.07
Fixed in: (no value)



Subject: use Mac::Carbon instead of Mac::AppleScript in Mac::Path::Util
Perhaps for use in Mac::Path::Util: $ perl -MMacPerl -le '$vol = MacPerl::Volumes(); $vol =~ s/^.+://; print$vol' Orr Volumes() returns all mounted volumes in list context, and the startup volume in scalar context. The paths returned text representations of FSSpec data structures, which can be converted to native paths with MacPerl::MakePath(): $ perl -MMacPerl=all -le 'print join "\n", map { MakePath($_) } Volumes()' / /Volumes/Bourque /Volumes/Bird /Volumes/Diablo II Play Disc /Volumes/Diablo II Cinematics (I just finished Diablo tonight, yay for me!) But that is not too helpful for getting the startup volume name. You can, however, merely strip off everything up to the ":" in the FSSpec to get the volume name: $ perl -MMacPerl -le 's/^.+://, print for MacPerl::Volumes()' Orr Bourque Bird Diablo II Play Disc Diablo II Cinematics It's a lot faster, and probably more reliable, than AppleScript. MacPerl is a part of Mac::Carbon. Enjoy,