As I've already mentioned I'm creating a. I've made a start on this, and the initial development (with very limited functionality) was well received at the last rehearsal. It has much more functionality than the old that I created for the last show, and the improved version that we've been using in the rehearsals so far.
![]()
This program is written using the Perl/Tk toolkit, which is provides a means of creating GUI applications using perl. As I'm already well into perl programming this is a logical step for my first real GUI based program.
Now that I've been working with Perl/Tk I've been trying it out on a few different machines. It works under Windows (as long as you install the ActivePerl software first), and here are a couple of issues on two different Linux distributions, Fedora and Ubuntu. I had similar issues with them both, so first I've put the pre-requisites and then I'll explain the problem later. Prerequisites for Ubuntu 6 (Dapper Drake) From a clean install of Ubuntu none of the development packages or libraries are installed. The following commands will install them so that we can then use CPAN to install the required modules. Apt-get install build-essential apt-get install lynx apt-get install curl apt-get install tk8.4-dev Prerequisite for Fedora FC5 I had already chosen the development packages during the install process.
If you did not then you should go into Add/Remove Programs and then add the make and related packages. You may also need to install the Tk development libraries.
Installing the Perl/Tk module (Perl::Tk) My first attempt at installing the module went as follows: perl -MCPAN -e 'install Tk' If this is the first time you've used CPAN then you will be asked a number of questions. You can normally just take the defaults, answering your own country for the repositories etc. The install went OK until was performing the tests on the module. The last few lines of the command are shown below. T/widget.ok t/wm-time.ok t/wm.ok t/X.ok t/zzHList.ok t/zzPhoto.ok t/zzScrolled.ok 1/94# Test 66 got: '589x341+0+32' (t/zzScrolled.t at line 104 fail #2) # Expected: '589x341+0+0' (Sizechk: geometry has not changed not reset for -height = 24+(5)) # t/zzScrolled.t line 104 is: ok($newgeo, $oldgeo, 'Sizechk: geometry has not changed not reset'. # Test 94 got: '589x341+17+32' (t/zzScrolled.t at line 104 fail #4) # Expected: '589x341+0+32' (Sizechk: geometry has not changed not reset for -width = 80+(5)) t/zzScrolled.FAILED tests 66, 94 Failed 2/94 tests, 97.87% okay t/zzText.ok t/zzTixGrid.ok Failed Test Stat Wstat Total Fail Failed List of Failed - t/JP.t 0 11 294 582 197.96% 4-294 t/KR.t 0 11 271 534 197.05% 5-271 t/zzScrolled.t 94 2 2.13% 66 94 (3 subtests UNEXPECTEDLY SUCCEEDED), 23 subtests skipped.
Failed 3/47 test scripts, 93.62% okay. 560/2619 subtests failed, 78.62% okay. Make:. testdynamic Error 255 There appear to be a few issues with the zzScrolled function. I couldn't find any reason for this, and earlier questions on the topic resulted in no reply.
I therefore decided to try and use a force to install regardless of the test. Install using perl -MCPAN -e shell force install Tk Whch then resulted in the following. Installing /usr/bin/tkjpeg Installing /usr/bin/ptksh Installing /usr/bin/gedi Installing /usr/bin/ptked Writing /usr/local/lib/perl/5.8.7/auto/Tk/.packlist Appending installation info to /usr/local/lib/perl/5.8.7/perllocal.pod /usr/bin/make install - OK Failed during this command: NI-S/Tk-804.027.tar.gz: maketest FAILED but failure ignored because 'force' in effect At this point the module has loaded. It appears to be working OK with my current program, even the bit that uses the scrolled wrapper. Hopefully it is working OK. Another thing I was looking at was instructions for using a Live CD. Obviously if there are problems installing the modules this is not going to work well as a Live CD.
Fortunately Knoppix (the original Live CD distribution), includes the perl/tk module, at least it does on the DVD version - I haven't tried the CD version yet. So it still looks as though I will be able to create Live CD/DVD instructions for those that are new to Linux, although it won't be using the Ubuntu Live CD which is the one I originally hoped to use.
When searching a Perl module, sooner or later you will end up on one of two sites sites providing information about CPAN modules. Both, and will show you a link to download the module, but in most cases that's not what you need.
So how do you really install Perl modules from CPAN? (As always, some people will disagree with the recommendations below, they probably have not read the, or reached other conclusions.) In most cases the installation of a CPAN module works just as installing an app from the Apple Appstore or the Google Play. Except, that these modules are all open source and free software. Depending on the Operating System and which Perl distribution you have, the specific instructions differ. In order to make the examples clearer, let's try to install the module called Try::Tiny. It has its description both on and on. Both have the Download links that we won't click on.
Cases. Strawberry Perl or DWIM Perl on Windows Both, and its derivative, come with an already configured cpan client.
We will use this client to install modules directly from CPAN: Open the Command Window (Start - Run - type in cmd) When you get the 'DOS' prompt type in cpan Path::Tiny. Please note, module names are case sensitive, so typing cpan path::tiny or cpan PATH::TINY will not work! Also, in normal circumstances, the cpan client is expecting the full name of the module, not one part of the name, and not the name of the zip-file. So cpan Path or cpan Tiny will attempt to install different modules. (One called Path, the other one called Tiny.) What you need to do is type in: c: cpan Path::Tiny ActivePerl There is a graphical tool for this as well, but it might be more simple just to open the Command Window (Start - Run - type cmd). When you get the 'DOS' prompt, type in ppm install Path::Tiny.
Please note, this too is case sensitive! C: ppm install Path::Tiny The problem you might encounter is that this command uses the 'CPAN store' of ActiveState that for various technical and legal reasons does not carry all the the modules from CPAN.
It can also be out-of date carrying older versions of the modules. On newer versions of ActivePerl you can also enable a real cpan-client that will access the CPAN server just as it does in the case of Strawberry/DWIM Perl above. Cygwin Perl TBD. Debian/Ubuntu Linux If you have root rights, and if you use the system perl located in /usr/bin/perl, then probably the best is to try to install from the package management system of your Linux distribution. If you don't have root rights, you could ask your system administrator to do it on your behalf. Apparently there is a nice way to. If the module you are looking for is not available in the repositories of your Debian/Ubuntu/etc.
Tvs rp 3160 driver for windows 7 32bit. Distribution (and there are only about 10% of the modules available), or if you don't use the system Perl, then you can follow the instructions with cpan/cpanm below. To install for the system-perl as root you can use either aptitude or apt-get depending on your personal preferences.
Perl Tk Module
If the name of the module in Perl-land is Path::Tiny, then the name of the package in Debian/Ubuntu-land is most likely going to be libpath-tiny-perl. $ sudo apt-get install libpath-tiny-perl $ sudo aptitude install libpath-tiny-perl RedHat/Fedora/CentOS Linux Just as in the case of Debian/Ubuntu above, the instructions here are relevant if you use the system perl located in /usr/bin/perl and if you have root rights: Using the package management system: $ sudo yum install perl-Path-Tiny As Dave Cross mentioned, if you don't know the name of the RH package, you can also use yum install 'perl(Path::Tiny)'. The subtle difference is that the former installs the named RPM whereas the second installs the RPM that provides the named Perl module. So if you would like to install the Path::Tiny module then the second command is actually the better one. If your vendor does not carry this Perl package, you can add other RPM repositories. Check out, and the maintained.
Mac OSX Follow the instructions with cpan/cpanm below. Using the cpan client While the cpan program comes with most operating system, and it works well after some configuration, there is probably a better, and certainly lighter solution called cpan minus or cpanm.
![]()
Using cpanm This is for Linux and OSX systems. (For Windows, see described above.) First, if you don't have it installed yet, then install by typing $ curl -L perl - App::cpanminus Once it is installed type: $ cpanm Path::Tiny If you still have questions related to the installation of Perl modules, please ask them below!
I'll try to update this article to answer those questions and to explain other situations. Specific instructions for. TODO Separate explanation of installing using cpan/cpanm as root stepping on the system perl, using local::lib to install in a private directory while using system perl. Using a manually compiled perl. Using perlbrew, creating 'virtual environments'.
Sorry, I executed and found this output: root@darkstar:# patch -p1.
Sorry, I executed and found this output: root@darkstar:# patch -p1.
Sorry, I executed and found this output: root@darkstar:# patch -p1.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |