r33778 - in /trunk/libenv-ps1-perl/debian/patches: ./ fix-HOME-as-tilde fix-command-substitution fix-example series

ryan52-guest at users.alioth.debian.org ryan52-guest at users.alioth.debian.org
Thu Apr 23 15:20:11 UTC 2009


Author: ryan52-guest
Date: Thu Apr 23 15:20:04 2009
New Revision: 33778

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=33778
Log:
add some patches

Added:
    trunk/libenv-ps1-perl/debian/patches/
    trunk/libenv-ps1-perl/debian/patches/fix-HOME-as-tilde
    trunk/libenv-ps1-perl/debian/patches/fix-command-substitution
    trunk/libenv-ps1-perl/debian/patches/fix-example
    trunk/libenv-ps1-perl/debian/patches/series

Added: trunk/libenv-ps1-perl/debian/patches/fix-HOME-as-tilde
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libenv-ps1-perl/debian/patches/fix-HOME-as-tilde?rev=33778&op=file
==============================================================================
--- trunk/libenv-ps1-perl/debian/patches/fix-HOME-as-tilde (added)
+++ trunk/libenv-ps1-perl/debian/patches/fix-HOME-as-tilde Thu Apr 23 15:20:04 2009
@@ -1,0 +1,18 @@
+if $PWD is $HOME, then a ~ is supposed to be displayed instead.
+
+--- a/lib/Env/PS1.pm
++++ b/lib/Env/PS1.pm
+@@ -107,9 +107,12 @@
+ sub U { $user_info[0] || $ENV{USER} || $ENV{LOGNAME} }
+ 
+ sub W { 
+-	return sub { $ENV{PWD} } if $_[1] eq 'w';
++	return sub { $ENV{PWD} eq $ENV{HOME} ? "~" : $ENV{PWD} } if $_[1] eq 'w';
+ 	return sub {
+ 		return '/' if $ENV{PWD} eq '/';
++                if($ENV{PWD} eq $ENV{HOME}) {
++                  return "~";
++                }
+ 		$ENV{PWD} =~ m#([^/]*)/?$#;
+ 		return $1;
+ 	};

Added: trunk/libenv-ps1-perl/debian/patches/fix-command-substitution
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libenv-ps1-perl/debian/patches/fix-command-substitution?rev=33778&op=file
==============================================================================
--- trunk/libenv-ps1-perl/debian/patches/fix-command-substitution (added)
+++ trunk/libenv-ps1-perl/debian/patches/fix-command-substitution Thu Apr 23 15:20:04 2009
@@ -1,0 +1,14 @@
+PS1='$(foobar)'
+
+--- a/lib/Env/PS1.pm
++++ b/lib/Env/PS1.pm
+@@ -46,6 +46,9 @@
+ 		$$self{cache} = [ $self->cache($format) ];
+ 	}
+ 	my $string = join '', map { ref($_) ? $_->() : $_ } @{$$self{cache}};
++        $string =~ s#\$\((.+)\)#
++          `$1`;
++        #ge;
+ 	return $string;
+ }
+ 

Added: trunk/libenv-ps1-perl/debian/patches/fix-example
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libenv-ps1-perl/debian/patches/fix-example?rev=33778&op=file
==============================================================================
--- trunk/libenv-ps1-perl/debian/patches/fix-example (added)
+++ trunk/libenv-ps1-perl/debian/patches/fix-example Thu Apr 23 15:20:04 2009
@@ -1,0 +1,15 @@
+so that it can be ran outside of the source
+
+--- a/example.pl
++++ b/example.pl
+@@ -1,9 +1,6 @@
+ #!/usr/bin/perl
+ 
+-use lib './blib/lib/';
+-
+-die "Please run \"perl Build.PL && ./Build\" first\n" unless -d './blib/lib/';
+-eval 'use Env::PS1 qw/$PS1/';
++use Env::PS1 qw/$PS1/;
+ 
+ my @demo = (
+ 	username => '\u',

Added: trunk/libenv-ps1-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libenv-ps1-perl/debian/patches/series?rev=33778&op=file
==============================================================================
--- trunk/libenv-ps1-perl/debian/patches/series (added)
+++ trunk/libenv-ps1-perl/debian/patches/series Thu Apr 23 15:20:04 2009
@@ -1,0 +1,3 @@
+fix-example
+fix-HOME-as-tilde
+fix-command-substitution




More information about the Pkg-perl-cvs-commits mailing list