in reply to how do I call this .pm from my script

First, it make no sense to post the entire contents of a module that you didn't write. We can see DIrSelect.pm any time we want - posting it here just uses up space.

Instead, you should post the code you wrote which is not working - but not the whoel program, just enough to demonstrate the issue. Post it between <code> </code> tags - otherwise it gets mangled.

To use this module after installation, you would do:

# DELETED. This module may be unueable in it's current form

be sure to see http://perlmonks.com/index.pl?node=Tutorials#usingmods

Second Update: I suggest you look for a different module, one with doc. This module may be useable, but I can't figure out how.

For the reord, here is ALL the comments and doc for this module:

# DirSelect: A Tk directory selection widget. # # This widget allows navigating MS Windows local and mapped network # drives and directories and selecting a directory. # # # On non-MS systems, this is simply a dialog box with a Dirtree in it. # # supercedes all versions of Win32Dirselect # Usage: my $dir = $mainwindow->DirSelect->Show; # Options: -dir=>"directory", -w=>"width" # # Email comments, questions or bug reports to Kristi Thompson, kristi@ +indexing.ca
There are no other comments or pod ANYWHERE in the module or included in the CPAN distribution, so far as I can tell.

--Bob Niederman, http://bob-n.com

All code given here is UNTESTED unless otherwise stated.

Replies are listed 'Best First'.
Re: Re: how do I call this .pm from my script
by CombatSquirrel (Hermit) on Aug 23, 2003 at 23:59 UTC
    bobn - I can't find DirSelect.pm on CPAN - so where could we find it? And I tried the code above, although I have no clue whatsoever about Perl/Tk, and came to the conclusion that there are probably even some issues in the module itself.
    The call to Win32API::File::GetVolumeInformation should probably be changed from
    Win32API::File::GetVolumeInformation($d,$volumelabel,,,,,,);
    to something like
    my $dummy; Win32API::File::GetVolumeInformation($d, $volumelabel, [], [], $dummy, + [], $dummy, $dummy);
    I still get an error about -directory => $d in sub _dirtree, though.
    Maybe I am completely wrong, but that is what I thought of it after reading the docs and playing a bit with it.
    Cheers, CombatSquirrel.

    Update: Found it at Tk::DirSelect; the first one of the above issues is not present at the module's installation on my system (ver 1.03).

      It's actually Tk::DirSelect and CPAN.pm found and installed it with no problems.

      I agree that there probablyly issues in the module - the example says use -w for width, but the Populate sub in the module refers to $args->{width}, I think. I deleted this thing from machine, (and I almost NEVER delete anything), so I no longer have it for reference and don't plan on using it for anything.

      POD is easy enough to use. So is #. If the author of the module couldn't use either of those, it's very disappointing.

      --Bob Niederman, http://bob-n.com

      All code given here is UNTESTED unless otherwise stated.