I made a few mods to get this working on Win32.
On my machine, the use statement required me to specify Win32, there might be some other incantation required on Linux? I also added -text so I could see something to drop onto. Then I took out the -droptypes. There appears to be something wrong with that.
So, the below does work on my Win32 box. Hopefully this will provide a few clues for your Linux problem.
#!/usr/bin/perl
use strict;
use Tk;
use Tk::DropSite qw(Win32);
my $mw = new MainWindow(-width => 500, -height => 300);
my $label = $mw->Label(-text => "this is test")->pack->place(-relwidth
+ => 1.0, -relheight => 1.0);
#$label->DropSite(-droptypes => ['XDND'], -dropcommand => [\&dropFile,
+ $label]);
$label->DropSite( -dropcommand => [\&dropFile, $label]);
MainLoop;
sub dropFile {
print "DROP\n";
}
Update: I am using Perl 5.22, Active State on Win XP. Tk and DropSite come in the standard dist, so I didn't have to install anything. Sorry I can't be of more help as I have no Linux to test on.
I did find this article
drag n drop primer. It says:
"Note: Perl/Tk supports Sun, XDND, KDE, and Win32 remote DND protocols". I suppose this is why I had to add
qw(Win32) to the use statement. Could be that what you need is "XDND"? Not sure, but an idea.