perldoc perllocal
use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name"
| [reply] [d/l] |
Hey tobyink, thanks for the reply!
Cool thanks, that does list installed Modules... But how come I can't see Gtk2 or Glib?
Are those not considered Modules? I also ran that command on my Linux box just to see if that maybe it was ONLY a
Windows thing for why it didn't show those, but I couldn't see it on there either...
Thanks again for the reply, much appreciated!
Thanks Again,
Matt
| [reply] |
It will probably only list modules that you've installed via the standard perl Makefile.PL; make; make test; make install (or the Build.PL equivalent) dance. This includes packages installed via the CPAN client. But if you've installed them some other way (e.g. your operating system's package manager) then that might bypass perllocal.pod.
I personally install absobloodylutely everything using cpanminus (or actually, my fork of cpanminus, called cpantimes), and my perllocal.pod seems pretty accurate.
I don't have Gtk2 on my current working version of Perl, but looking at perllocal.pod for my older installation, I see:
Tue Jan 15 14:22:03 2013: "Module" Gtk2
· "installed into: /home/tai/.perlbrew/libs/perl-5.16.2@defau
+lt/lib/perl5"
· "LINKTYPE: dynamic"
· "VERSION: 1.246"
· "EXE_FILES: "
use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name
| [reply] [d/l] [select] |
G'day mmartin,
I needed to do something similar just yesterday. I worked with the log of cpan commands which, on my system (not MSWin), is in ~/.cpan/histfile.
Luckily, this hasn't quite scrolled off the top of my screen yet:
$ perl -Mwarnings -Mstrict -Mautodie -E '
open my $fh, "<", "$ENV{HOME}/.cpan/histfile";
my @modules;
my %seen;
while (<$fh>) {
next unless /^install (.*)$/;
next if $1 =~ /^Tk/;
next if $seen{$1}++;
push @modules, $1;
}
say "force test @modules";
'
That's it verbatim.
You'll need to make a few changes:
-
The command line quoting is, I believe, pretty much the opposite on your OS to what I have here.
-
Where I'm filtering out modules starting with Tk, you'll want to filter out everything except Gtk, Glib and Pango. I'll assume you have a better idea of what their namespaces are than I do.
-
I was generating a "force test ..." command to be pasted directly at the "cpan[n]>" prompt; you'll presumably want "install ...".
| [reply] [d/l] [select] |
Hey toby, thanks again for the reply!
Hummm... Yea I had tried installing Gtk2 a number of times only to have it fail almost every try, through CPAN and PPM as far
as I remember. But, when I installed it on my linux box it installed without a hitch but when trying on Windows, that's when
I had the issues. I do remember seeing the error that "PkgConfig" was missing, which it wasn't, so I think I remember having to
forcefully install Gtk2, which was after forcefully installing "Cairo", "Pango", and "Glib" which were dependencies of Gtk, I think...
Ok, so I just now powered on my Windows PC, which is actually just a Windows XP Virtual Machine. And I just checked the Downloads
folder and I do have this in there --> gtk-2.8.20-win32-1.exe. I think that may have been what I used, so I should probably be
fine with just that...
Hey kcott, thanks for the reply!
Ok, cool I'll give that a shot, thanks! Yea, ever since I became a Sys Admin the ONLY OS I use nowadays is Unix/Linux and just fell in
love with it lol, I cringe everytime I need to do stuff with Windows, especially ANYTHING involving scripting languages... But anyway
thanks again for the info, I'll give that a shot when I get a chance.
Also, one other thing, when I was having all those issue trying to install Gtk, I had installed Gtk2 Runtime. But I don't think that
actually helped my cause at all because Perl still complained about Gtk2 missing when attempting to execute the script. Any idea what the
Gtk2 Runtime is actually for..? You can see "Gtk2 Runtime" under the Start Menu in Windows.
Well here's a short background of why I wanted to do this:
So basically I just created this Gtk2 program that will be used by a few different co-workers, who all run some version of windows, all 32-bit
as far as I remember. So I was debating on whether or not I should attempt to install Perl as well as all the required Modules on their PCs.
But after the nightmare I had doing it on my own PC I'm thinking I should probably use something like Cava Packager, which I've already
installed on my XP VM, but haven't gotten the hang of it yet. From what I read about Cava Packager, I think I can just create a "Project" and include
the required files and images, etc.. and Cava would create a .exe file which would allow someone to execute the program without needing Perl...
But I'm still trying to play around with it a bit, not really sure how it works just yet...
But anyway, thanks AGAIN guys for the replies, very much appreciated!
Thanks Again,
Matt
| [reply] |