Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

tie on windows XP

by BillKSmith (Priest)
on Aug 17, 2013 at 22:56 UTC ( #1049876=perlquestion: print w/replies, xml ) Need Help??
BillKSmith has asked for the wisdom of the Perl Monks concerning the following question:

I am using ActiveState Perl 5.16.1 on windows XP. The function dbmopen meets my immediate requirements for a persistent hash. The perl documentation states that this function is largely superseded by tie. None of the modules (*DBM_File) are in the PPM repository. (I assume that this is because the data bases they require are not available) I want to know if it is even possible for me to use tie for this purpose. If so, does it offer any real advantage. And if it does, what do I have to download and how do I use it.

Update: Corrected perl version number.

Replies are listed 'Best First'.
Re: tie on windows XP
by Corion (Pope) on Aug 17, 2013 at 23:04 UTC

    I think at least DBM_File or GDBM_File should be available to you - at least, GDBM_File is available with my Strawberry Perl 5.16.

    Alternatively, you can look whether DBM::Deep is available from PPM.

    tie is a far more general mechanism that can be used to produce the mechanism that dbmopen used to produce, but its power is far larger than that.

      Thanks for the suggestions, but there are no DBM_File modules in the repository. Since my first post, I have found in @INC. I do not know how it got there, but it works as advertised.
Re: tie on windows XP
by kcott (Canon) on Aug 18, 2013 at 05:16 UTC

    G'day Bill,

    Both DB_File and SDBM_File are builtin modules that ship with Perl.

    I don't have your Perl/OS combination so I can't really comment on the PPM repository; however, if builtin modules are not normally available via PPM, that would at least explain the absence of DB_File and SDBM_File.

    That would also shed some light on your later comment: "I have found in @INC. I do not know how it got there".

    -- Ken

Re: tie on windows XP
by Kordaff (Scribe) on Aug 18, 2013 at 15:36 UTC has DB_File

    for ActiveState's x86 Perl versions 5.6 / 5.8 / 5.10 / 5.12 / 5.14 / 5.16
    use: ppm install

    for ActiveState's x64 Perl versions 5.10 / 5.12 / 5.14 / 5.16
    use: ppm install

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1049876]
Approved by Old_Gray_Bear
[Corion]: Meh. I get the feeling I should post a call-to-action for people to test their modules with the upcoming 5.26 (or 5.25.latest), as it seems that the smoke testers don't really weed out modules that fail without . in @INC
[Corion]: But without instructions on how to easily test things yourself, I don't think such a call to arms is helpful
[Corion]: (this post on / p5p makes it seem to me that smoke testers seem to have a blind spot there)
[Corion]: Hmmm. Maybe setting $ENV{PERL5LIB}=" some path without dot"; perl Makefile.PL; make test already is enough to locally test your module...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2017-03-27 08:02 GMT
Find Nodes?
    Voting Booth?
    Should Pluto Get Its Planethood Back?

    Results (317 votes). Check out past polls.