From: Karen Etheridge Date: Wed, 4 Sep 2013 22:11:01 +0000 (-0700) Subject: whitespace cleanup X-Git-Tag: 1.008012~7 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit%2Flocal-lib.git;a=commitdiff_plain;h=8522f4d534fb0a64f7be010048e988dfda658258 whitespace cleanup --- diff --git a/Makefile.PL b/Makefile.PL index 3d9252c..d7198f6 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -6,7 +6,7 @@ use vars qw($bootstrapping $bootstrapping_args $no_manpages); use Config; # Solaris (and possibly other Unices) have a tar in /usr/bin that, among -# other things, does not understand @LongLink. This can cause +# other things, does not understand @LongLink. This can cause # extraction to look like it succeeded, but it actually failed (because # the error message for the @LongLink failure scrolled offscreen). # Therefore, given the fact that GNU tar is the most widespread tar available, @@ -107,7 +107,7 @@ DEATH } return $orig->(@_); }; - # not yet -- apeiron, 2010-03-10 + # not yet -- apeiron, 2010-03-10 #$CPAN::Config->{urllist} = ["http://cpan.shadowcatprojects.net"]; # all bootstrapped fine on one DH account # on another, it tries to install man stuff into /usr/local @@ -159,10 +159,10 @@ DEATH system($^X, '-MCPAN', '-e', $cpan_config_command) unless $did_cpan_config; system($^X, '-MCPAN', - '-e', + '-e', q[CPAN::HandleConfig->load;], - '-e', - q[$CPAN::Config->{makepl_arg} = ] . + '-e', + q[$CPAN::Config->{makepl_arg} = ] . q['INSTALLMAN1DIR=none INSTALLMAN3DIR=none';], '-e', q[$CPAN::Config->{buildpl_arg} = ] . diff --git a/lib/POD2/DE/local/lib.pod b/lib/POD2/DE/local/lib.pod index 6681975..458f8f0 100644 --- a/lib/POD2/DE/local/lib.pod +++ b/lib/POD2/DE/local/lib.pod @@ -41,7 +41,7 @@ würden das von local::lib erstellte lib/ Verzeichnis nicht nutzen. Standardmäßig installiert sich local::lib in ~/perl5. -Windows Benutzern müssen ausserdem dies hier lesen: +Windows Benutzern müssen ausserdem dies hier lesen: L. 1. Lade das Tar-Archiv von CPAN runter (Suche nach "Download" auf der CPAN Seite von @@ -65,7 +65,7 @@ dieses Verzeichnis als Parameter angeben: make test && make install 4. Nun müssen wir die benötigten Umgebungsvariablen, damit Perl unser neu generiertes -lib/ Verzeichnis benutzt. Wenn du bash oder eine andere Bourne Shell benutzt, kannst +lib/ Verzeichnis benutzt. Wenn du bash oder eine andere Bourne Shell benutzt, kannst du es über diesen Weg zu deinem Shell Startup Skript hinzufügen: echo 'eval $(perl -I$HOME/perl5/lib/perl5 -Mlocal::lib)' >>~/.bashrc @@ -84,7 +84,7 @@ dann musst du dieses Verzeichnis als Parameter beim Laden des Modules local::lib Nachdem diese Änderungen in deinem Shell Startup Skript gemacht wurden, ist es nun wichtig das diese Umgebungsvariablen auch gesetzt sind in deiner aktuellen Umgebung. In Bourne -Shells macht man dies z.B. mit C<. ~/.bashrc>, und in C Shell würde man es mit: +Shells macht man dies z.B. mit C<. ~/.bashrc>, und in C Shell würde man es mit: C mit. Wenn du eine sehr langsames System hast, oder du unter drakonischen Regulierungen des @@ -116,7 +116,7 @@ eigenständige lib/ Umgebungen zu bekommen: Für mehrere Umgebungen in dieser Form brauch man eine Modifikation in der Benutzung von C<< use FindBin >> in dem "Im Code" Beispiel oben. Wenn du sowas machst, und du hast damit z.B. Perl Module nach C<< -~/mydir1/lib >> installiert und du hast ein Script in C<< +~/mydir1/lib >> installiert und du hast ein Script in C<< ~/mydir1/scripts/myscript.pl >>, du musst dort angeben das die Module die es braucht im Verzeichnis C<< ~/mydir1/lib >> liegen. @@ -124,7 +124,7 @@ In C<< ~/mydir1/scripts/myscript.pl >> steht dann: use strict; use warnings; - use local::lib "$FindBin::Bin/.."; ### zeigt auf ~/mydir1 und local::lib + use local::lib "$FindBin::Bin/.."; ### zeigt auf ~/mydir1 und local::lib ### findet dort lib use lib "$FindBin::Bin/../lib"; ### zeigt auf ~/mydir1/lib @@ -141,13 +141,13 @@ Sitzung mit C zu setzen, kann man folgendes kommando nutzen: set PERL_MM_OPT=INSTALL_BASE=C:\DOCUME~1\ADMINI~1\perl5 set PERL5LIB=C:\DOCUME~1\ADMINI~1\perl5\lib\perl5;C:\DOCUME~1\ADMINI~1\perl5\lib\perl5\MSWin32-x86-multi-thread set PATH=C:\DOCUME~1\ADMINI~1\perl5\bin;%PATH% - + ### Um die Umgebungsvariablen für diese Shell alleine zu setzen C:\>perl -Mlocal::lib > %TEMP%\tmp.bat && %TEMP%\tmp.bat && del %TEMP%\temp.bat ### anstelle von $(perl -Mlocal::lib=./) in bash. Wenn du willst das die Umgebungsvariablen dauerhaft gesetzt sind, musst du diese -in Systemsteuerung / System dauerhaft selber eintragen oder +in Systemsteuerung / System dauerhaft selber eintragen oder L benutzen. Die "~" wird übersetzt zu dem Benutzer Profil Verzeichnis (das Verzeichnis was @@ -169,11 +169,11 @@ Systemverwaltung auch installiert wurde. local::lib löst dieses Problem, es erlaubt dir dein komplett eigenes Verzeichnis für deine CPAN Module zu haben und bist so nicht genötigt die Module vom -System zu nutzen oder andersrum andere User nicht mit individuellen +System zu nutzen oder andersrum andere User nicht mit individuellen Modulwünschen zu Überarbeitung ihres Codes zu zwingen, weil bestimmte Module zentral für alle auf neuere Version upgedatet werden. Die Installation findet hierbei dann z.B. im Home Verzeichnis statt. Es werden nur Umgebungsvariablen -gesetzt die das installierte Perl dazu bewegen die im Homeverzeichnis +gesetzt die das installierte Perl dazu bewegen die im Homeverzeichnis installierten Module zu benutzen, zusätzlich und vorgezogen zu denen auf dem System. @@ -371,11 +371,11 @@ Macht aus dem angegebenen Pfad einen absoluten Pfad. Hierbei wird der Pfad durch die folgende Methoden gegeben, wobei der Rückgabewert der ersten an die nächste weitergeben wird, um die Umgebung zu konfigurieren -für die lokale Bibliotheks Installation: L, -L, L. +für die lokale Bibliotheks Installation: L, +L, L. Der daraus resultierende Pfad wird zu L übergeben, dessen Resultat dann weitergegeben wird an L, wessen Resultat dann -weitergegeben wird an L. Dieses Resultat wird dann final +weitergegeben wird an L. Dieses Resultat wird dann final an L übergeben, welches dann den Rückgabewert stellt. =head1 EINE WARNUNG VOR UNINST=1 @@ -393,7 +393,7 @@ entgegenkommen. =head1 EINSCHRÄNKUNGEN Die Werkzeuge von perl, die benutzt werden um die Pakete zu installieren -(die sogenannte toolchain), sind leider nicht in der Lage sauber mit +(die sogenannte toolchain), sind leider nicht in der Lage sauber mit Verzeichnissen umzugehen die Leerzeichen enthalten und können daher local::lib nicht direkt in ein solches Verzeichnis installieren. Was du machen kannst ist B der Installation von local::lib und der Module die du in deiner @@ -426,10 +426,10 @@ geschrieben damit sie auch nach dem Neustarten erhalten bleiben. Wenn du local::lib konfiguriert hast CPAN Module in deinem Home Verzeichnis zu installieren, und du danach versuchst mit C ein Modul -zu installieren, und dabei einen Fehler bekommst, wie: C und in der installationsausgabe steht -irgendwo ein Fehler der sagt C<'INSTALL_BASE' is not a known MakeMaker parameter +irgendwo ein Fehler der sagt C<'INSTALL_BASE' is not a known MakeMaker parameter name>, dann hast du aus irgendeinem Grund dein neue Version von ExtUtils::MakeMaker verloren. diff --git a/lib/POD2/PT_BR/local/lib.pod b/lib/POD2/PT_BR/local/lib.pod index 3d21e99..38ffed5 100644 --- a/lib/POD2/PT_BR/local/lib.pod +++ b/lib/POD2/PT_BR/local/lib.pod @@ -138,7 +138,7 @@ do C, você pode fazer assim: set PERL_MM_OPT=INSTALL_BASE=C:\DOCUME~1\ADMINI~1\perl5 set PERL5LIB=C:\DOCUME~1\ADMINI~1\perl5\lib\perl5;C:\DOCUME~1\ADMINI~1\perl5\lib\perl5\MSWin32-x86-multi-thread set PATH=C:\DOCUME~1\ADMINI~1\perl5\bin;%PATH% - + ### Para configurar o ambiente apenas dessa shell C:\>perl -Mlocal::lib > %TEMP%\tmp.bat && %TEMP%\tmp.bat && del %TEMP%\temp.bat ### em vez de $(perl -Mlocal::lib=./) diff --git a/lib/local/lib.pm b/lib/local/lib.pm index c466e4e..b21e04e 100644 --- a/lib/local/lib.pm +++ b/lib/local/lib.pm @@ -100,7 +100,7 @@ sub pipeline { package local::lib; { package Foo; sub foo { -$_[1] } sub bar { $_[1]+2 } sub baz { $_[1]+3 } } -my $foo = bless({}, 'Foo'); +my $foo = bless({}, 'Foo'); Test::More::ok($foo->${pipeline qw(foo bar baz)}(10) == -15); =end testing @@ -584,9 +584,9 @@ From the shell - A typical way to install local::lib is using what is known as the "bootstrapping" technique. You would do this if your system administrator hasn't already installed local::lib. In this case, you'll need to install -local::lib in your home directory. +local::lib in your home directory. -If you do have administrative privileges, you will still want to set up your +If you do have administrative privileges, you will still want to set up your environment variables, as discussed in step 4. Without this, you would still install the modules into the system CPAN installation and also your Perl scripts will not use the lib/ path you bootstrapped with local::lib. @@ -616,7 +616,7 @@ to specify the name of the directory when you call bootstrap, as follows: make test && make install -4. Now we need to setup the appropriate environment variables, so that Perl +4. Now we need to setup the appropriate environment variables, so that Perl starts using our newly generated lib/ directory. If you are using bash or any other Bourne shells, you can add this to your shell startup script this way: @@ -630,13 +630,13 @@ If you are using C shell, you can do this as follows: /bin/csh perl -I$HOME/perl5/lib/perl5 -Mlocal::lib >> ~/.cshrc -If you passed to bootstrap a directory other than default, you also need to give that as +If you passed to bootstrap a directory other than default, you also need to give that as import parameter to the call of the local::lib module like this way: echo 'eval $(perl -I$HOME/foo/lib/perl5 -Mlocal::lib=$HOME/foo)' >>~/.bashrc After writing your shell configuration file, be sure to re-read it to get the -changed settings into your current shell's environment. Bourne shells use +changed settings into your current shell's environment. Bourne shells use C<. ~/.bashrc> for this, whereas C shells use C. If you're on a slower machine, or are operating under draconian disk space @@ -645,9 +645,9 @@ installing modules by using the C<--no-manpages> argument when bootstrapping: perl Makefile.PL --bootstrap --no-manpages -To avoid doing several bootstrap for several Perl module environments on the -same account, for example if you use it for several different deployed -applications independently, you can use one bootstrapped local::lib +To avoid doing several bootstrap for several Perl module environments on the +same account, for example if you use it for several different deployed +applications independently, you can use one bootstrapped local::lib installation to install modules in different directories directly this way: cd ~/mydir1 @@ -700,7 +700,7 @@ C, you can use this: set PERL_MM_OPT=INSTALL_BASE=C:\DOCUME~1\ADMINI~1\perl5 set PERL5LIB=C:\DOCUME~1\ADMINI~1\perl5\lib\perl5;C:\DOCUME~1\ADMINI~1\perl5\lib\perl5\MSWin32-x86-multi-thread set PATH=C:\DOCUME~1\ADMINI~1\perl5\bin;%PATH% - + ### To set the environment for this shell alone C:\>perl -Mlocal::lib > %TEMP%\tmp.bat && %TEMP%\tmp.bat && del %TEMP%\tmp.bat ### instead of $(perl -Mlocal::lib=./) @@ -734,7 +734,7 @@ packages takes precedence over the system installation. If you are using a package management system (such as Debian), you don't need to worry about Debian and CPAN stepping on each other's toes. Your local version of the packages will be written to an entirely separate directory from those -installed by Debian. +installed by Debian. =head1 DESCRIPTION diff --git a/t/install.t b/t/install.t index 67cfa17..2ac49cc 100644 --- a/t/install.t +++ b/t/install.t @@ -20,7 +20,7 @@ my $orig_dir = cwd; SKIP: for my $dist_type (qw(EUMM MB)) { chdir File::Spec->catdir($orig_dir, qw(t dist), $dist_type); if ($dist_type eq 'EUMM') { - my ($stdout, $stderr) = capture { eval { + my ($stdout, $stderr) = capture { eval { system($^X, 'Makefile.PL') && die "Makefile.PL failed"; system($Config{make}, 'install') && die "$Config{make} install failed"; } }; diff --git a/t/pipeline.t b/t/pipeline.t index f1994ad..886aaf0 100644 --- a/t/pipeline.t +++ b/t/pipeline.t @@ -9,7 +9,7 @@ use local::lib (); package local::lib; { package Foo; sub foo { -$_[1] } sub bar { $_[1]+2 } sub baz { $_[1]+3 } } -my $foo = bless({}, 'Foo'); +my $foo = bless({}, 'Foo'); Test::More::ok($foo->${pipeline qw(foo bar baz)}(10) == -15); }