Jump utility
Utility per memorizzare e cambiare la directory di lavoro utilizzando shortcut ultimo aggiornamento: 02.11.2010

Introduzione
L' utility jump consentr di memorizzare la directory di lavoro associandola ad un alias , tramite il quale poter riposizionarsi sulla directory associata. Download Jump-1.002.tar.gz Git Source available at http://gitorious.org/jump-perl Project files: Jump.pm jump.sh
Modalita' d' uso
Per aggiungere una nuovo shortcut associato alla directory corrente : jump add <nome-shortcut>
[enzo@enzo6 jump]$ jump add jump
Added new entry to jump:            jump => /home/enzo/workspace/perl/jump 

Per listare i shortcut disponibili:
[enzo@enzo6 jump]$ jump list
Shortcut list: 
     appunti : /home/enzo/ENZO/appunti 
        home : /home/enzo 
        jump : /home/enzo/workspace/perl/jump 

Per rimuovere un shortcut dalla lista : jump remove <nome-shortcut>
[enzo@enzo6 jump]$ jump remove jump
Realizzare modulo installabile per cpan ( usando Module::Build )
Creare la struttura base Jump ( usare l' opzione mb per selezionare il modulo Module::Build )
[enzo@enzo6 jump]$ module-starter -mb --module=Jump  --author="Enzo Arlati" --email=enzo.arlati@libero.it 
Created starter directories and files

[enzo@enzo6 jump]$ find Jump
Jump
Jump/ignore.txt
Jump/MANIFEST
Jump/Changes
Jump/t
Jump/t/boilerplate.t
Jump/t/pod.t
Jump/t/pod-coverage.t
Jump/t/00-load.t
Jump/Build.PL
Jump/lib
Jump/lib/Jump.pm
Jump/README        
Aggiungere eventuali directory necessarie e copiare nella struttura i file del programma
[enzo@enzo6 jump]$ cp    Jump.pm  Jump/lib/Jump.pm
[enzo@enzo6 jump]$ chmod +x Jump/lib/Jump.pm
[enzo@enzo6 jump]$ mkdir Jump/sh
[enzo@enzo6 jump]$ cp    jump.sh  Jump/sh
Modificare il file Jump/Build.PL per aggiungere file non contemplati nella configurazione generica
[enzo@enzo6 Jump]$ cat Build.PL
use strict;
use warnings;
use Module::Build;

my $builder = Module::Build->new(
    module_name         => 'Jump',
    license             => 'perl',
    dist_author         => q{Enzo Arlati },
    dist_version_from   => 'lib/Jump.pm',
    build_requires => {
        'Test::More' => 0,
    },
    sh_files => { 'sh/jump.sh' => 'sh/jump.sh'  }, 
    add_to_cleanup      => [ 'Jump-*' ],
    create_makefile_pl => 'traditional',
);

$builder->install_path( 'sh' => '/etc/profile.d/' );
$builder->add_build_element( 'sh' ); 

$builder->create_build_script();
Eseguire il modulo Build.PL
[enzo@enzo6 ]$ cd Jump 
[enzo@enzo6 Jump]$ perl Build.PL 
Checking whether your kit is complete...
Looks good

Checking prerequisites...
Looks good

Deleting Build
Removed previous script 'Build'

Creating new 'Build' script for 'Jump' version '1.001'

[enzo@enzo6 Jump]$ ./Build 
Copying lib/Jump.pm -> blib/lib/Jump.pm
Copying sh/jump.sh -> blib/sh/jump.sh
Manifying blib/lib/Jump.pm -> blib/libdoc/Jump.3pm
Installazione di prova in una directory temporanea ( /tmp/test )
[enzo@enzo6 Jump]$  ./Build install --destdir  /tmp/test
Installing /tmp/test/usr/local/share/perl5/Jump.pm
Installing /tmp/test/usr/local/share/man/man3/Jump.3pm
Installing /tmp/test/etc/profile.d/jump.sh
Writing /tmp/test/usr/local/lib/perl5/auto/Jump/.packlist
Creare il pacchetto di distribuzione : Jump-1.001.tar.gz
[enzo@enzo6 Jump]$  ./Build dist
Creating Makefile.PL
Deleting META.yml
Creating META.yml
Creating Jump-1.001
Creating Jump-1.001.tar.gz
Deleting Jump-1.001
Installazione tramite cpan. Il file tgz Jump-1.001.tar.gz deve essere scopattato in una directory temporanea, quindi eseguire il comando cpan passando come parametro il nome della directory Jump indicando la sottodirectory '/.' che indica a cpan di eseguire l'installazione da un file locale.
[root@enzo6 ~]# cpan /home/enzo/workspace/perl/jump/Jump/.
You are visiting the local directory
  '/home/enzo/workspace/perl/jump/Jump/.'
  without lock, take care that concurrent processes do not do likewise.
CPAN: Time::HiRes loaded ok (v1.9719)
CPAN: Storable loaded ok (v2.20)
Going to read '/root/.cpan/Metadata'
  Database was generated on Tue, 17 Aug 2010 12:31:17 GMT
CPAN: YAML loaded ok (v0.70)
Running make for /home/enzo/workspace/perl/jump/Jump/.
CPAN: Module::Build loaded ok (v0.35)

  CPAN.pm: Going to build /home/enzo/workspace/perl/jump/Jump/.

Checking whether your kit is complete...
Looks good

Checking prerequisites...
Looks good

Deleting Build
Removed previous script 'Build'

Creating new 'Build' script for 'Jump' version '1.001'
  /home/enzo/workspace/perl/jump/Jump/.
  ./Build -- OK
Directory '/home/enzo/workspace/perl/jump/Jump/.' not below /root/.cpan/build, will not store persistent state
Running Build test
t/00-load.t ....... 1/1 # Testing Jump 1.001, Perl 5.010001, /usr/bin/perl
t/00-load.t ....... ok   
t/boilerplate.t ... ok   
t/pod-coverage.t .. skipped: Test::Pod::Coverage 1.08 required for testing POD coverage
t/pod.t ........... ok   
All tests successful.

Test Summary Report
-------------------
t/boilerplate.t (Wstat: 0 Tests: 3 Failed: 0)
  TODO passed:   3
Files=4, Tests=5,  0 wallclock secs ( 0.03 usr  0.01 sys +  0.16 cusr  0.03 csys =  0.23 CPU)
Result: PASS
  /home/enzo/workspace/perl/jump/Jump/.
  ./Build test -- OK
Directory '/home/enzo/workspace/perl/jump/Jump/.' not below /root/.cpan/build, will not store persistent state
Running Build install
Prepending /home/enzo/workspace/perl/jump/Jump/./blib/arch /home/enzo/workspace/perl/jump/Jump/./blib/lib to PERL5LIB for 'install'
Installing /usr/local/share/perl5/Jump.pm
Installing /usr/local/share/man/man3/Jump.3pm
Installing /etc/profile.d/jump.sh
Writing /usr/local/lib/perl5/auto/Jump/.packlist
  /home/enzo/workspace/perl/jump/Jump/.
  ./Build install  -- OK
Directory '/home/enzo/workspace/perl/jump/Jump/.' not below /root/.cpan/build, will not store persistent state