Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

Re: File::XDG on varying platforms

by stevieb (Canon)
on May 27, 2025 at 08:52 UTC ( [id://11165135]=note: print w/replies, xml ) Need Help??


in reply to File::XDG on varying platforms

I'm confused. You ask what looks better, but all I see are directory paths. Why not just use File::HomeDir to get the user's home directory regardless of OS, and create your directory structure there?

use File::HomeDir; my $home_dir = File::HomeDir->my_home; ... do stuff in home dir

Forget about checking for OS. Just get the home directory of the user regardless of Operating System, create your own sub directory, and dump your content there.

...unless I'm missing something obvious here...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11165135]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (3)
As of 2026-01-16 05:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (118 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.