Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
go ahead... be a heretic
 
PerlMonks  

tie on windows XP

by BillKSmith (Hermit)
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.
Bill

Comment on tie on windows XP
Select or Download Code
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 SDBM_File.pm in @INC. I do not know how it got there, but it works as advertised.
      Bill
Re: tie on windows XP
by kcott (Abbot) 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 SDBM_File.pm in @INC. I do not know how it got there".

    -- Ken

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

    for ActiveState's x86 Perl versions 5.6 / 5.8 / 5.10 / 5.12 / 5.14 / 5.16
    use: ppm install http://www.bribes.org/perl/ppm/DB_File.ppd

    for ActiveState's x64 Perl versions 5.10 / 5.12 / 5.14 / 5.16
    use: ppm install http://www.bribes.org/perl/ppm64/DB_File.ppd

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://1049876]
Approved by Old_Gray_Bear
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (12)
As of 2014-04-21 15:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (495 votes), past polls