r12154 - in /trunk/libproc-invokeeditor-perl: ./ debian/ examples/ lib/Proc/ t/

gwolf at users.alioth.debian.org gwolf at users.alioth.debian.org
Mon Jan 7 17:28:47 UTC 2008


Author: gwolf
Date: Mon Jan  7 17:28:47 2008
New Revision: 12154

URL: http://svn.debian.org/wsvn/?sc=1&rev=12154
Log:
New upstream version, some general cleanup

Added:
    trunk/libproc-invokeeditor-perl/LICENSE
      - copied unchanged from r12153, branches/upstream/libproc-invokeeditor-perl/current/LICENSE
    trunk/libproc-invokeeditor-perl/META.yml
      - copied unchanged from r12153, branches/upstream/libproc-invokeeditor-perl/current/META.yml
    trunk/libproc-invokeeditor-perl/examples/
      - copied from r12153, branches/upstream/libproc-invokeeditor-perl/current/examples/
    trunk/libproc-invokeeditor-perl/t/03_pod.t
      - copied unchanged from r12153, branches/upstream/libproc-invokeeditor-perl/current/t/03_pod.t
    trunk/libproc-invokeeditor-perl/t/04_pod_coverage.t
      - copied unchanged from r12153, branches/upstream/libproc-invokeeditor-perl/current/t/04_pod_coverage.t
Removed:
    trunk/libproc-invokeeditor-perl/debian/libproc-invokeeditor-perl.examples
    trunk/libproc-invokeeditor-perl/debian/substvars
    trunk/libproc-invokeeditor-perl/example.pl
    trunk/libproc-invokeeditor-perl/example2.pl
Modified:
    trunk/libproc-invokeeditor-perl/Changes
    trunk/libproc-invokeeditor-perl/MANIFEST
    trunk/libproc-invokeeditor-perl/Makefile.PL
    trunk/libproc-invokeeditor-perl/debian/changelog
    trunk/libproc-invokeeditor-perl/debian/compat
    trunk/libproc-invokeeditor-perl/debian/control
    trunk/libproc-invokeeditor-perl/debian/rules
    trunk/libproc-invokeeditor-perl/lib/Proc/InvokeEditor.pm

Modified: trunk/libproc-invokeeditor-perl/Changes
URL: http://svn.debian.org/wsvn/trunk/libproc-invokeeditor-perl/Changes?rev=12154&op=diff
==============================================================================
--- trunk/libproc-invokeeditor-perl/Changes (original)
+++ trunk/libproc-invokeeditor-perl/Changes Mon Jan  7 17:28:47 2008
@@ -8,3 +8,10 @@
   - new version, incorporate feedback so $EDITOR = 'xemacs -nw'
     works, added more error checking when looping through editors
     , added editors_env and editors_prepend.
+
+1.01 13 Mar 2007
+  - Increase CPANTS score.
+
+1.02 16 Dec 2007
+  - Patches from Tim Booth tbooth at ceh.ac.uk to provide optional filename
+	suffix option.

Modified: trunk/libproc-invokeeditor-perl/MANIFEST
URL: http://svn.debian.org/wsvn/trunk/libproc-invokeeditor-perl/MANIFEST?rev=12154&op=diff
==============================================================================
--- trunk/libproc-invokeeditor-perl/MANIFEST (original)
+++ trunk/libproc-invokeeditor-perl/MANIFEST Mon Jan  7 17:28:47 2008
@@ -2,8 +2,12 @@
 lib/Proc/InvokeEditor.pm
 Makefile.PL
 MANIFEST
+LICENSE
 README
 t/01_require.t
 t/02_editor.t
-example.pl
-example2.pl
+t/03_pod.t
+t/04_pod_coverage.t
+examples/example.pl
+examples/example2.pl
+META.yml                                 Module meta-data (added by MakeMaker)

Modified: trunk/libproc-invokeeditor-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/trunk/libproc-invokeeditor-perl/Makefile.PL?rev=12154&op=diff
==============================================================================
--- trunk/libproc-invokeeditor-perl/Makefile.PL (original)
+++ trunk/libproc-invokeeditor-perl/Makefile.PL Mon Jan  7 17:28:47 2008
@@ -19,4 +19,5 @@
     ($] >= 5.005 ?    ## Add these new keywords supported since 5.005
       (ABSTRACT => 'Interface to external editor from perl', 
        AUTHOR     => 'Michael Stevens <mstevens at etla.org>') : ()),
+    'LICENSE' => 'perl',
 );

Modified: trunk/libproc-invokeeditor-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libproc-invokeeditor-perl/debian/changelog?rev=12154&op=diff
==============================================================================
--- trunk/libproc-invokeeditor-perl/debian/changelog (original)
+++ trunk/libproc-invokeeditor-perl/debian/changelog Mon Jan  7 17:28:47 2008
@@ -1,11 +1,22 @@
-libproc-invokeeditor-perl (0.02-4) UNRELEASED; urgency=low
+libproc-invokeeditor-perl (1.02-1) unstable; urgency=low
 
+  [ gregor herrmann ]
   * debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser
     field (source stanza); Homepage field (source stanza).
   * Set Maintainer to Debian Perl Group.
   * Use dist-based URL in debian/watch.
 
- -- gregor herrmann <gregor+debian at comodo.priv.at>  Sat, 01 Dec 2007 18:55:15 +0100
+  [ Gunnar Wolf ]
+  * New upstream release
+  * Added myself as an uploader
+  * Bumped up standards-version to 3.7.3 (no changes needed)
+  * Upgraded dh_compat level to 5
+  * Listed the examples to be installed inside debian/rules, instead of
+    an external file
+  * No longer ignores failure on make clean
+  * Debhelper is b-d, not b-d-i
+
+ -- Gunnar Wolf <gwolf at debian.org>  Mon, 07 Jan 2008 11:26:17 -0600
 
 libproc-invokeeditor-perl (0.02-3) unstable; urgency=low
 

Modified: trunk/libproc-invokeeditor-perl/debian/compat
URL: http://svn.debian.org/wsvn/trunk/libproc-invokeeditor-perl/debian/compat?rev=12154&op=diff
==============================================================================
--- trunk/libproc-invokeeditor-perl/debian/compat (original)
+++ trunk/libproc-invokeeditor-perl/debian/compat Mon Jan  7 17:28:47 2008
@@ -1,1 +1,1 @@
-4
+5

Modified: trunk/libproc-invokeeditor-perl/debian/control
URL: http://svn.debian.org/wsvn/trunk/libproc-invokeeditor-perl/debian/control?rev=12154&op=diff
==============================================================================
--- trunk/libproc-invokeeditor-perl/debian/control (original)
+++ trunk/libproc-invokeeditor-perl/debian/control Mon Jan  7 17:28:47 2008
@@ -2,9 +2,10 @@
 Section: perl
 Priority: optional
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Uploaders: Jay Bonci <jaybonci at debian.org>
-Build-Depends-Indep: debhelper (>> 4.0.0), perl (>= 5.6.0-16), libcarp-assert-perl, ed | nvi | editor
-Standards-Version: 3.6.1.0
+Uploaders: Jay Bonci <jaybonci at debian.org>, Gunnar Wolf <gwolf at debian.org>
+Build-Depends: debhelper (>> 5.0.0)
+Build-Depends-Indep: perl (>= 5.6.0-16), libcarp-assert-perl, ed | nvi | editor
+Standards-Version: 3.7.3
 Homepage: http://search.cpan.org/dist/Proc-InvokeEditor/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libproc-invokeeditor-perl/
 Vcs-Browser: http://svn.debian.org/wsvn/pkg-perl/trunk/libproc-invokeeditor-perl/

Modified: trunk/libproc-invokeeditor-perl/debian/rules
URL: http://svn.debian.org/wsvn/trunk/libproc-invokeeditor-perl/debian/rules?rev=12154&op=diff
==============================================================================
--- trunk/libproc-invokeeditor-perl/debian/rules (original)
+++ trunk/libproc-invokeeditor-perl/debian/rules Mon Jan  7 17:28:47 2008
@@ -19,7 +19,7 @@
 	dh_testdir
 	dh_testroot
 
-	-$(MAKE) clean
+	[ ! -f Makefile ] || $(MAKE) distclean
 	rm -f Makefile.old
 	dh_clean
 
@@ -30,7 +30,6 @@
 	dh_installdirs
 
 	$(MAKE) PREFIX=$(PKGROOT) OPTIMIZE="-O2 -g -Wall" test install
-	dh_installexamples
 	-find $(CURDIR)/debian -type d | xargs rmdir -p --ignore-fail-on-non-empty
 	-find $(CURDIR)/debian -name "*.pl" -exec chmod 755 {} \;
 
@@ -40,6 +39,7 @@
 	dh_testroot
 	dh_installdocs
 	dh_installman
+	dh_installexamples examples/example.pl examples/example2.pl
 	dh_installchangelogs Changes
 	dh_link
 	dh_strip

Modified: trunk/libproc-invokeeditor-perl/lib/Proc/InvokeEditor.pm
URL: http://svn.debian.org/wsvn/trunk/libproc-invokeeditor-perl/lib/Proc/InvokeEditor.pm?rev=12154&op=diff
==============================================================================
--- trunk/libproc-invokeeditor-perl/lib/Proc/InvokeEditor.pm (original)
+++ trunk/libproc-invokeeditor-perl/lib/Proc/InvokeEditor.pm Mon Jan  7 17:28:47 2008
@@ -27,10 +27,10 @@
 
 @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
 
- @EXPORT = qw(
+ at EXPORT = qw(
 	
 );
-$VERSION = '0.02';
+$VERSION = '1.02';
 
 @DEFAULT_EDITORS = ( $ENV{'VISUAL'}, $ENV{'EDITOR'}, '/usr/bin/vi',
                      '/bin/vi', '/bin/ed'
@@ -101,6 +101,7 @@
 sub edit {
   my $self = shift;
   my $arg = shift;
+  my $suff = shift;
   # if the argument supplied is a reference to an array of lines,
   # join it together based on the input record separator
   if (ref($arg) eq 'ARRAY') {
@@ -108,9 +109,9 @@
   }
   my $result;
   if (ref($self)) {
-    $result = _edit($arg, $self->{'editors'}, $self->{'cleanup'});
+    $result = _edit($arg, $self->{'editors'}, $self->{'cleanup'}, $suff);
   } else {
-    $result = _edit($arg, \@DEFAULT_EDITORS, 1);
+    $result = _edit($arg, \@DEFAULT_EDITORS, 1, $suff);
   }
   if (wantarray) {
     my @result = split m|$/|, $result;
@@ -164,6 +165,8 @@
   my $string = shift;
   my $er = shift;
   my $unlink = shift;
+  my $suff = shift;
+
   assert(ref($er) eq 'ARRAY');
   assert(defined $unlink);
   my @editors = @$er; 
@@ -171,8 +174,11 @@
 
   my $chosen_editor = first_usable(undef, $er); 
 
+  my @suff;
+  @suff = (SUFFIX => $suff) if $suff;
+
   # get a temp file, and write the text to it
-  my ($fh, $filename) = tempfile(UNLINK => $unlink);
+  my ($fh, $filename) = tempfile(UNLINK => $unlink, @suff);
   print $fh $string;
   close $fh or die "Couldn't close tempfile [$filename]; $!";
   # start the editor
@@ -313,6 +319,14 @@
   $editor->cleanup(0);
   my $result = $editor->edit($string);
 
+A optional second argument is available $suff - example usage:
+
+	my $reuslt = Proc::InvokeEditor->edit($string, '.xml');
+
+This specifies a filename suffix to be used when the editor is launched - this
+can be useful if the data in the file is of a particular type and you want to
+trigger an editor's syntax highlighting mode.
+
 =head1 TODO
 
 =over 4
@@ -328,6 +342,8 @@
 Michael Stevens E<lt>mstevens at etla.orgE<gt>. Also incorporating
 suggestions and feedback from Leon Brocard and Phil Pennock.
 
+Patches supplied by Tim Booth.
+
 =head1 SEE ALSO
 
 L<perl>.




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