Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: "Porting" scripts to Win32

by fstat(pipe) (Scribe)
on Feb 24, 2004 at 00:37 UTC ( [id://331271]=note: print w/replies, xml ) Need Help??


in reply to "Porting" scripts to Win32

Probably a little off-topic but, why the registry prejudice? Until recently I was a solid UNIX coder and admin. I have been dragged into creating a perl application for Win32 and find it very handy (and easy) to store static application variables in the registry using the Win32::TieRegistry module.
Another nice thing is that if you have some standard reg values you can export them to a .reg file (use REGEDIT4 format); when you want them installed on another system you can manualy double click the file and the entries will be added. I find this solution works better for me than the .ini file.

Replies are listed 'Best First'.
Re: "Porting" scripts to Win32
by b10m (Vicar) on Feb 24, 2004 at 11:20 UTC
    "why the registry prejudice?"

    I have a few things that I don't like about the approach, althought they are mostly out of a user's perspecitve.

    1. Comments
    2. Unreadable
    3. Multi platform problem

    1. With text files, it's easy to comment a certain value out. This way, you will keep the old value, while you can try a new value. Besides the altering, I like some explanation in configuration files anyway: "This value is used for yadayadayada". With the registry approach, you can of course alter values too, but either you should have a good memory, or write every old value down somewhere, in case you ever want to return to the old value.

    2. Maybe it's just me, but I find it terribly hard to find where exactly an app. stores its configuration, due to the massive ammount of data that is all located in one place. It can take quite a bit of time to finally locate the "folder" (or whatever it is called) with the configuration options.

    3. As I stated, I already have a working app. targeted for *NIX systems, which don't have a registry. Hacking the registry support in, would make no sense for the *NIX systems and only add problems (if I decide to add one option to the config file, I would have to make sure the registry would get that change too, which I am likely to forget, for I don't use a win32 system myself).

    --
    b10m

    All code is usually tested, but rarely trusted.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2024-04-25 21:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found