@@ -1,33 +0,0 @@
-# Build.PL
-# Copyright (c) 2008 by David Golden. All rights reserved.
-# Licensed under Apache License, Version 2.0 (the "License").
-# You may not use this file except in compliance with the License.
-# A copy of the License was distributed with this file or you may obtain a
-# copy of the License from http://www.apache.org/licenses/LICENSE-2.0
-
-use strict;
-use lib 'inc';
-eval "require Pod::WikiDoc";
-my $class = $@ ? "Module::Build" : "Module::Build::WikiDoc";
-eval "require $class";
-my $build = $class->new(
- module_name => 'Term::Title',
- dist_author => 'David Golden <dagolden@cpan.org>',
- license => 'apache',
- create_readme => 1,
-# create_makefile_pl => 'traditional',
- requires => {
- 'perl' => '5.004',
- 'Exporter' => 0,
- ( $^O eq 'MSWin32' ? ( "Win32::Console" => 0 ) : () ),
- },
- build_requires => {
- 'Test::More' => 0.62,
- },
- meta_add => {
- no_index => {
- directory => [ qw/ examples inc t /],
- }
- },
-);
-$build->create_build_script;
@@ -0,0 +1,100 @@
+## HOW TO CONTRIBUTE
+
+Thank you for considering contributing to this distribution. This file
+contains instructions that will help you work with the source code.
+
+The distribution is managed with Dist::Zilla. This means than many of the
+usual files you might expect are not in the repository, but are generated at
+release time (e.g. Makefile.PL).
+
+Generally, **you do not need Dist::Zilla to contribute patches**. You do need
+Dist::Zilla to create a tarball and/or install from the repository. See below
+for guidance.
+
+### Getting dependencies
+
+See the included `cpanfile` file for a list of dependencies. If you have
+App::cpanminus 1.6 or later installed, you can use `cpanm` to satisfy
+dependencies like this:
+
+ $ cpanm --installdeps .
+
+Otherwise, you can install Module::CPANfile 1.0002 or later and then satisfy
+dependencies with the regular `cpan` client and `cpanfile-dump`:
+
+ $ cpan `cpanfile-dump`
+
+### Running tests
+
+You can run tests directly using the `prove` tool:
+
+ $ prove -l
+ $ prove -lv t/some_test_file.t
+
+For most of my distributions, `prove` is entirely sufficient for you to test any
+patches you have. I use `prove` for 99% of my testing during development.
+
+### Code style and tidying
+
+Please try to match any existing coding style. If there is a `.perltidyrc`
+file, please install Perl::Tidy and use perltidy before submitting patches.
+
+If there is a `tidyall.ini` file, you can also install Code::TidyAll and run
+`tidyall` on a file or `tidyall -a` to tidy all files.
+
+### Patching documentation
+
+Much of the documentation Pod is generated at release time. Depending on the
+distribution, some of my documentation may be written in a Pod dialect called
+WikiDoc. (See Pod::WikiDoc on CPAN.)
+
+If you would like to submit a documentation edit, please limit yourself to the
+documentation you see.
+
+If you see typos or documentation issues in the generated docs, please
+email or open a bug ticket instead of patching.
+
+### Installing from the repository
+
+If you want to install directly from the repository, you need to have
+Dist::Zilla installed (see below). If this is a burden to you, I welcome
+patches against a CPAN tarball instead of the repository.
+
+### Installing and using Dist::Zilla
+
+Dist::Zilla is a very powerful authoring tool, optimized for maintaining a
+large number of distributions with a high degree of automation, but it has a
+large dependency chain, a bit of a learning curve and requires a number of
+author-specific plugins.
+
+To install it from CPAN, I recommend one of the following approaches for
+the quickest installation:
+
+ # using CPAN.pm, but bypassing non-functional pod tests
+ $ cpan TAP::Harness::Restricted
+ $ PERL_MM_USE_DEFAULT=1 HARNESS_CLASS=TAP::Harness::Restricted cpan Dist::Zilla
+
+ # using cpanm, bypassing *all* tests
+ $ cpanm -n Dist::Zilla
+
+In either case, it's probably going to take about 10 minutes. Go for a walk,
+go get a cup of your favorite beverage, take a bathroom break, or whatever.
+When you get back, Dist::Zilla should be ready for you.
+
+Then you need to install any plugins specific to this distribution:
+
+ $ cpan `dzil authordeps`
+ $ dzil authordeps | cpanm
+
+Once installed, here are some dzil commands you might try:
+
+ $ dzil build
+ $ dzil test
+ $ dzil xtest
+
+To install from the repository, use:
+
+ $ dzil install
+
+You can learn more about Dist::Zilla at http://dzil.org/
+
@@ -1,11 +1,35 @@
-# Copyright (c) 2008 by David Golden. All rights reserved.
-# Licensed under Apache License, Version 2.0 (the "License").
-# You may not use this file except in compliance with the License.
-# A copy of the License was distributed with this file or you may obtain a
-# copy of the License from http://www.apache.org/licenses/LICENSE-2.0
-
Revision history for Term-Title
+0.08 2014-03-14 15:40:03+01:00 Europe/Paris
+
+ [FIXED]
+
+ - Tests now skip when NONINTERACTIVE|AUTOMATED_TESTING is set
+
+0.07 2013-02-02 20:29:07 America/New_York
+
+ - Fix for MSWin32 broken in 0.04 (CHORNY)
+
+0.06 2013-01-27 12:26:47 America/New_York
+
+ - Fix missing import in SYNOPSIS (MELO)
+
+0.05 2013-01-26 23:10:52 America/New_York
+
+ - Make Win32::Console a prereq only on Win32 (again)
+
+0.04 2013-01-26 15:59:42 America/New_York
+
+ - Mention iTerm2.app support (MELO)
+
+ - Support Windows builds that set $^O to lower-case mswin32 (MELO)
+
+ - Extract core logic of set_titlebar() into _set() (MELO)
+
+ - Add set_tab_title() (MELO)
+
+ - Distribution management converted to Dist::Zilla
+
0.03 Wed Mar 19 09:48:44 EDT 2008
- Added: support for 'screen' terminals (RT#34236 from David Precious)
@@ -1,29 +0,0 @@
-# INSTALL
-# Copyright (c) 2008 by David Golden. All rights reserved.
-# Licensed under Apache License, Version 2.0 (the "License").
-# You may not use this file except in compliance with the License.
-# A copy of the License was distributed with this file or you may obtain a
-# copy of the License from http://www.apache.org/licenses/LICENSE-2.0
-
-INSTALLATION
-
-This distribution may be installed via one of the following
-methods:
-
-
-1. If Build.PL exists and Module::Build is installed:
-
- perl Build.PL
- perl Build
- perl Build test
- perl Build install
-
-2. If Makefile.PL exists:
-
- perl Makefile.PL
- make
- make test
- make install
-
-If you are on a Windows machine you should use
-'nmake' or 'dmake' rather than 'make'.
@@ -1,3 +1,9 @@
+This software is Copyright (c) 2008 by David Golden.
+
+This is free software, licensed under:
+
+ The Apache License, Version 2.0, January 2004
+
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
@@ -1,20 +1,25 @@
-# Initial manifest generated by Module::Boilerplate
-lib/Term/Title.pm
-t/01-Term-Title.t
-Build.PL
+# This file was automatically generated by Dist::Zilla::Plugin::Manifest v5.013.
+CONTRIBUTING
+Changes
LICENSE
-INSTALL
MANIFEST
-MANIFEST.SKIP
-README
-Changes
-Todo
-inc/Module/Build/WikiDoc.pm
-xt/pod-format.t
-xt/pod-coverage.t
-xt/critic.t
-xt/perlcriticrc
-xt/spelling.t
-xt/stopwords.txt
-lib/Term/Title.pod
+META.json
META.yml
+Makefile.PL
+README
+cpanfile
+dist.ini
+lib/Term/Title.pm
+perlcritic.rc
+t/00-report-prereqs.t
+t/01-Term-Title.t
+tidyall.ini
+xt/author/00-compile.t
+xt/author/critic.t
+xt/author/pod-spell.t
+xt/release/distmeta.t
+xt/release/minimum-version.t
+xt/release/pod-coverage.t
+xt/release/pod-syntax.t
+xt/release/portability.t
+xt/release/test-version.t
@@ -1,34 +0,0 @@
-# MANIFEST.SKIP
-# Copyright (c) 2008 by David Golden. All rights reserved.
-# Licensed under Apache License, Version 2.0 (the "License").
-# You may not use this file except in compliance with the License.
-# A copy of the License was distributed with this file or you may obtain a
-# copy of the License from http://www.apache.org/licenses/LICENSE-2.0
-
-# Version control files and dirs.
-\bRCS\b
-\bCVS\b
-,v$
-.svn/
-^.git
-
-# Generated by Perl module toolchain
-^MANIFEST\.(?!SKIP)
-^Makefile$
-^blib/
-^blibdirs$
-^PM_to_blib$
-^MakeMaker-\d
-^Build$
-^_build
-^cover_db
-^.*\.bat$
-
-# Temp, old, vi and emacs files.
-~$
-\.old$
-\#\.*\#$
-\.\#$
-\.swp$
-\.bak$
-^pod.*\.tmp$
@@ -0,0 +1,97 @@
+{
+ "abstract" : "Portable API to set the terminal titlebar",
+ "author" : [
+ "David Golden <dagolden@cpan.org>"
+ ],
+ "dynamic_config" : 1,
+ "generated_by" : "Dist::Zilla version 5.013, CPAN::Meta::Converter version 2.140640",
+ "license" : [
+ "apache_2_0"
+ ],
+ "meta-spec" : {
+ "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
+ "version" : "2"
+ },
+ "name" : "Term-Title",
+ "no_index" : {
+ "directory" : [
+ "t",
+ "xt",
+ "examples",
+ "corpus"
+ ],
+ "package" : [
+ "DB"
+ ]
+ },
+ "prereqs" : {
+ "configure" : {
+ "requires" : {
+ "ExtUtils::MakeMaker" : "6.17"
+ }
+ },
+ "develop" : {
+ "requires" : {
+ "Dist::Zilla" : "5.013",
+ "Dist::Zilla::Plugin::OSPrereqs" : "0",
+ "Dist::Zilla::Plugin::RemovePrereqs" : "0",
+ "Dist::Zilla::PluginBundle::DAGOLDEN" : "0.060",
+ "File::Spec" : "0",
+ "File::Temp" : "0",
+ "IO::Handle" : "0",
+ "IPC::Open3" : "0",
+ "Pod::Coverage::TrustPod" : "0",
+ "Test::CPAN::Meta" : "0",
+ "Test::More" : "0",
+ "Test::Pod" : "1.41",
+ "Test::Pod::Coverage" : "1.08"
+ }
+ },
+ "runtime" : {
+ "requires" : {
+ "Exporter" : "0",
+ "perl" : "5.006",
+ "strict" : "0",
+ "warnings" : "0"
+ }
+ },
+ "test" : {
+ "recommends" : {
+ "CPAN::Meta" : "0",
+ "CPAN::Meta::Requirements" : "2.120900"
+ },
+ "requires" : {
+ "ExtUtils::MakeMaker" : "0",
+ "File::Spec::Functions" : "0",
+ "List::Util" : "0",
+ "Test::More" : "0",
+ "version" : "0"
+ }
+ }
+ },
+ "provides" : {
+ "Term::Title" : {
+ "file" : "lib/Term/Title.pm",
+ "version" : "0.08"
+ }
+ },
+ "release_status" : "stable",
+ "resources" : {
+ "bugtracker" : {
+ "web" : "https://github.com/dagolden/Term-Title/issues"
+ },
+ "homepage" : "https://github.com/dagolden/Term-Title",
+ "repository" : {
+ "type" : "git",
+ "url" : "https://github.com/dagolden/Term-Title.git",
+ "web" : "https://github.com/dagolden/Term-Title"
+ }
+ },
+ "version" : "0.08",
+ "x_authority" : "cpan:DAGOLDEN",
+ "x_contributors" : [
+ "Alexandr Ciornii <alexchorny@gmail.com>",
+ "Pedro Melo <melo@simplicidade.org>"
+ ]
+}
+
@@ -1,27 +1,45 @@
---
-name: Term-Title
-version: 0.03
+abstract: 'Portable API to set the terminal titlebar'
author:
- 'David Golden <dagolden@cpan.org>'
-abstract: Portable API to set the terminal titlebar
-license: apache
-resources:
- license: http://apache.org/licenses/LICENSE-2.0
-requires:
- Exporter: 0
- perl: 5.004
build_requires:
- Test::More: 0.62
-provides:
- Term::Title:
- file: lib/Term/Title.pm
- version: 0.03
-generated_by: Module::Build version 0.280801
+ ExtUtils::MakeMaker: '0'
+ File::Spec::Functions: '0'
+ List::Util: '0'
+ Test::More: '0'
+ version: '0'
+configure_requires:
+ ExtUtils::MakeMaker: '6.17'
+dynamic_config: 1
+generated_by: 'Dist::Zilla version 5.013, CPAN::Meta::Converter version 2.140640'
+license: apache
meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.2.html
- version: 1.2
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: '1.4'
+name: Term-Title
no_index:
directory:
- - examples
- - inc
- t
+ - xt
+ - examples
+ - corpus
+ package:
+ - DB
+provides:
+ Term::Title:
+ file: lib/Term/Title.pm
+ version: '0.08'
+requires:
+ Exporter: '0'
+ perl: '5.006'
+ strict: '0'
+ warnings: '0'
+resources:
+ bugtracker: https://github.com/dagolden/Term-Title/issues
+ homepage: https://github.com/dagolden/Term-Title
+ repository: https://github.com/dagolden/Term-Title.git
+version: '0.08'
+x_authority: cpan:DAGOLDEN
+x_contributors:
+ - 'Alexandr Ciornii <alexchorny@gmail.com>'
+ - 'Pedro Melo <melo@simplicidade.org>'
@@ -0,0 +1,70 @@
+
+# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v5.013.
+use strict;
+use warnings;
+
+use 5.006;
+
+use ExtUtils::MakeMaker 6.17;
+
+
+
+my %WriteMakefileArgs = (
+ "ABSTRACT" => "Portable API to set the terminal titlebar",
+ "AUTHOR" => "David Golden <dagolden\@cpan.org>",
+ "BUILD_REQUIRES" => {},
+ "CONFIGURE_REQUIRES" => {
+ "ExtUtils::MakeMaker" => "6.17"
+ },
+ "DISTNAME" => "Term-Title",
+ "EXE_FILES" => [],
+ "LICENSE" => "apache",
+ "NAME" => "Term::Title",
+ "PREREQ_PM" => {
+ "Exporter" => 0,
+ "strict" => 0,
+ "warnings" => 0
+ },
+ "TEST_REQUIRES" => {
+ "ExtUtils::MakeMaker" => 0,
+ "File::Spec::Functions" => 0,
+ "List::Util" => 0,
+ "Test::More" => 0,
+ "version" => 0
+ },
+ "VERSION" => "0.08",
+ "test" => {
+ "TESTS" => "t/*.t"
+ }
+);
+
+
+my %FallbackPrereqs = (
+ "Exporter" => 0,
+ "ExtUtils::MakeMaker" => 0,
+ "File::Spec::Functions" => 0,
+ "List::Util" => 0,
+ "Test::More" => 0,
+ "strict" => 0,
+ "version" => 0,
+ "warnings" => 0
+);
+
+
+unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
+ delete $WriteMakefileArgs{TEST_REQUIRES};
+ delete $WriteMakefileArgs{BUILD_REQUIRES};
+ $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
+}
+
+delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
+ unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
+
+if ( $^O eq 'MSWin32' ) {
+ $WriteMakefileArgs{PREREQ_PM}{'Win32::Console'} = '0';
+}
+
+WriteMakefile(%WriteMakefileArgs);
+
+
+
@@ -2,23 +2,27 @@ NAME
Term::Title - Portable API to set the terminal titlebar
VERSION
- This documentation describes version 0.03.
+ version 0.08
SYNOPSIS
- use Term::Title 'set_titlebar';
-
- set_titlebar("This goes into the title");
-
- set_titlebar("Title", "And also print this to the terminal");
+ use Term::Title 'set_titlebar', 'set_tab_title';
+
+ set_titlebar("This goes into the title");
+
+ set_titlebar("Title", "And also print this to the terminal");
+
+ set_tab_title("This goes into the tab title");
+
+ set_tab_title("Tab Title", "And also print this to the terminal");
DESCRIPTION
- Term::Title provides an abstraction for setting the titlebar (or title
- tab) across different types of terminals. For *nix terminals, it prints
- the appropriate escape sequences to set the terminal title based on the
- value of $ENV{TERM}. On Windows, it uses Win32::Console to set the title
- directly.
+ Term::Title provides an abstraction for setting the titlebar or the tab
+ title across different types of terminals. For *nix terminals, it prints
+ the appropriate escape sequences to set the terminal or tab title based
+ on the value of $ENV{TERM}. On Windows, it uses Win32::Console to set
+ the title directly.
- Currently, supported terminals include:
+ Currently, changing the titlebar is supported in these terminals:
* xterm
@@ -26,11 +30,17 @@ DESCRIPTION
* screen
+ * iTerm2.app
+
* Win32 console
+ The terminals that support changing the tab title include:
+
+ * iTerm2.app
+
USAGE
- "set_titlebar()"
- set_titlebar( $title, @optional_text );
+ set_titlebar
+ set_titlebar( $title, @optional_text );
Sets the titlebar to $title or clears the titlebar if $title is
undefined.
@@ -44,37 +54,43 @@ USAGE
If the terminal is not supported, set_titlebar silently continues,
printing @optional_text if any.
-BUGS
- Please report any bugs or feature using the CPAN Request Tracker. Bugs
- can be submitted through the web interface at
- <http://rt.cpan.org/Dist/Display.html?Queue=Term-Title>
+ set_tab_title
+ set_tab_title( $title, @optional_text );
- When submitting a bug or request, please include a test-file or a patch
- to an existing test-file that illustrates the bug or desired feature.
+ Has the exact same semantics as the "set_titlebar" but changes the tab
+ title.
SEE ALSO
* Win32::Console
* <http://www.ibiblio.org/pub/Linux/docs/HOWTO/Xterm-Title>
+SUPPORT
+ Bugs / Feature Requests
+ Please report any bugs or feature requests through the issue tracker at
+ <https://github.com/dagolden/Term-Title/issues>. You will be notified
+ automatically of any progress on your issue.
+
+ Source Code
+ This is open source software. The code repository is available for
+ public review and contribution under the terms of the license.
+
+ <https://github.com/dagolden/Term-Title>
+
+ git clone https://github.com/dagolden/Term-Title.git
+
AUTHOR
- David A. Golden (DAGOLDEN)
+ David Golden <dagolden@cpan.org>
+
+CONTRIBUTORS
+ * Alexandr Ciornii <alexchorny@gmail.com>
+
+ * Pedro Melo <melo@simplicidade.org>
COPYRIGHT AND LICENSE
- Copyright (c) 2008 by David A. Golden. All rights reserved.
-
- Licensed under Apache License, Version 2.0 (the "License"). You may not
- use this file except in compliance with the License. A copy of the
- License was distributed with this file or you may obtain a copy of the
- License from http://www.apache.org/licenses/LICENSE-2.0
-
- Files produced as output though the use of this software, shall not be
- considered Derivative Works, but shall be considered the original work
- of the Licensor.
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
+ This software is Copyright (c) 2008 by David Golden.
+
+ This is free software, licensed under:
+
+ The Apache License, Version 2.0, January 2004
@@ -1,10 +0,0 @@
-# Todo
-# Copyright (c) 2008 by David Golden. All rights reserved.
-# Licensed under Apache License, Version 2.0 (the "License").
-# You may not use this file except in compliance with the License.
-# A copy of the License was distributed with this file or you may obtain a
-# copy of the License from http://www.apache.org/licenses/LICENSE-2.0
-
-- Write some code
-- Write some tests
-- Replace boilerplate docs with real documentation
@@ -0,0 +1,37 @@
+requires "Exporter" => "0";
+requires "perl" => "5.006";
+requires "strict" => "0";
+requires "warnings" => "0";
+
+on 'test' => sub {
+ requires "ExtUtils::MakeMaker" => "0";
+ requires "File::Spec::Functions" => "0";
+ requires "List::Util" => "0";
+ requires "Test::More" => "0";
+ requires "version" => "0";
+};
+
+on 'test' => sub {
+ recommends "CPAN::Meta" => "0";
+ recommends "CPAN::Meta::Requirements" => "2.120900";
+};
+
+on 'configure' => sub {
+ requires "ExtUtils::MakeMaker" => "6.17";
+};
+
+on 'develop' => sub {
+ requires "Dist::Zilla" => "5.013";
+ requires "Dist::Zilla::Plugin::OSPrereqs" => "0";
+ requires "Dist::Zilla::Plugin::RemovePrereqs" => "0";
+ requires "Dist::Zilla::PluginBundle::DAGOLDEN" => "0.060";
+ requires "File::Spec" => "0";
+ requires "File::Temp" => "0";
+ requires "IO::Handle" => "0";
+ requires "IPC::Open3" => "0";
+ requires "Pod::Coverage::TrustPod" => "0";
+ requires "Test::CPAN::Meta" => "0";
+ requires "Test::More" => "0";
+ requires "Test::Pod" => "1.41";
+ requires "Test::Pod::Coverage" => "1.08";
+};
@@ -0,0 +1,17 @@
+name = Term-Title
+author = David Golden <dagolden@cpan.org>
+license = Apache_2_0
+copyright_holder = David Golden
+copyright_year = 2008
+
+[@DAGOLDEN]
+:version = 0.060
+stopwords = titlebar
+stopwords = rxvt
+stopwords = iTerm
+
+[RemovePrereqs]
+remove = Win32::Console
+
+[OSPrereqs / MSWin32]
+Win32::Console = 0
@@ -1,56 +0,0 @@
-package Module::Build::WikiDoc;
-use strict;
-use base qw/Module::Build/;
-use File::Spec;
-
-sub ACTION_wikidoc {
- my $self = shift;
- eval "use Pod::WikiDoc";
- if ( $@ eq '' ) {
- my $parser = Pod::WikiDoc->new({
- comment_blocks => 1,
- keywords => { VERSION => $self->dist_version },
- });
- for my $src ( keys %{ $self->find_pm_files() } ) {
- (my $tgt = $src) =~ s{\.pm$}{.pod};
- $parser->filter( {
- input => $src,
- output => $tgt,
- });
- print "Creating $tgt\n";
- $tgt =~ s{\\}{/}g;
- $self->_add_to_manifest( 'MANIFEST', $tgt );
- }
- }
- else {
- warn "Pod::WikiDoc not available. Skipping wikidoc.\n";
- }
-}
-
-sub ACTION_test {
- my $self = shift;
- my $missing_pod;
- for my $src ( keys %{ $self->find_pm_files() } ) {
- (my $tgt = $src) =~ s{\.pm$}{.pod};
- $missing_pod = 1 if ! -e $tgt;
- }
- if ( $missing_pod ) {
- $self->depends_on('wikidoc');
- $self->depends_on('build');
- }
- $self->SUPER::ACTION_test;
-}
-
-sub ACTION_testpod {
- my $self = shift;
- $self->depends_on('wikidoc');
- $self->SUPER::ACTION_testpod;
-}
-
-sub ACTION_distmeta {
- my $self = shift;
- $self->depends_on('wikidoc');
- $self->SUPER::ACTION_distmeta;
-}
-
-1;
@@ -1,63 +1,68 @@
-# lib/Term/Title.pm
-# Copyright (c) 2008 by David Golden. All rights reserved.
-# Licensed under Apache License, Version 2.0 (the "License").
-# You may not use this file except in compliance with the License.
-# A copy of the License was distributed with this file or you may obtain a
-# copy of the License from http://www.apache.org/licenses/LICENSE-2.0
-
package Term::Title;
use strict;
use warnings;
-
-our $VERSION = '0.03';
-$VERSION = eval $VERSION; ## no critic
+# ABSTRACT: Portable API to set the terminal titlebar
+our $VERSION = '0.08'; # VERSION
use Exporter;
-our @ISA = 'Exporter';
-our @EXPORT_OK = qw/set_titlebar/;
+our @ISA = 'Exporter';
+our @EXPORT_OK = qw/set_titlebar set_tab_title/;
# encodings by terminal type -- except for mswin32 get matched as regex
# against $ENV{TERM}
# code ref gets title and text to print
my %terminal = (
'xterm|rxvt' => {
- pre => "\033]2;",
+ pre => "\033]2;",
post => "\007",
},
'screen' => {
- pre => "\ek",
+ pre => "\ek",
post => "\e\\",
},
'mswin32' => sub {
- my ($title, @optional) = @_;
+ my ( $title, @optional ) = @_;
my $c = Win32::Console->new();
$c->Title($title);
print STDOUT @optional, "\n";
},
);
-sub set_titlebar {
- my ($title, @optional) = @_;
+my %terminal_tabs = (
+ 'iterm2' => {
+ is_supported => sub {
+ $ENV{TERM_PROGRAM} and $ENV{TERM_PROGRAM} eq 'iTerm.app';
+ },
+ pre => "\033]1;",
+ post => "\007",
+ },
+);
+
+sub _set {
+ my ( $type_cb, $types, $title, @optional ) = @_;
$title = q{ } unless defined $title;
- my $type = _is_supported();
+ my $type = $type_cb->();
- if ( $type ) {
- if ( ref $terminal{$type} eq 'CODE' ) {
- $terminal{$type}->( $title, @optional );
+ if ($type) {
+ if ( ref $types->{$type} eq 'CODE' ) {
+ $types->{$type}->( $title, @optional );
}
- elsif (ref $terminal{$type} eq 'HASH' ) {
- print STDOUT $terminal{$type}{pre}, $title,
- $terminal{$type}{post}, @optional, "\n";
+ elsif ( ref $types->{$type} eq 'HASH' ) {
+ print STDOUT $types->{$type}{pre}, $title, $types->{$type}{post}, @optional, "\n";
}
}
- elsif ( @optional ) {
+ elsif (@optional) {
print STDOUT @optional, "\n";
}
return;
}
+sub set_titlebar { _set( \&_is_supported, \%terminal, @_ ) }
+
+sub set_tab_title { _set( \&_is_supported_tabs, \%terminal_tabs, @_ ) }
+
sub _is_supported {
- if ( $^O eq 'MSWin32' ) {
+ if ( lc($^O) eq 'mswin32' ) {
return 'mswin32' if eval { require Win32::Console };
}
else {
@@ -69,98 +74,167 @@ sub _is_supported {
return;
}
+sub _is_supported_tabs {
+ for my $k ( keys %terminal_tabs ) {
+ return $k if $terminal_tabs{$k}{is_supported}->();
+ }
+
+ return;
+}
+
1;
__END__
-=begin wikidoc
+=pod
-= NAME
+=encoding UTF-8
+
+=head1 NAME
Term::Title - Portable API to set the terminal titlebar
-= VERSION
+=head1 VERSION
-This documentation describes version %%VERSION%%.
+version 0.08
-= SYNOPSIS
+=head1 SYNOPSIS
- use Term::Title 'set_titlebar';
+ use Term::Title 'set_titlebar', 'set_tab_title';
set_titlebar("This goes into the title");
set_titlebar("Title", "And also print this to the terminal");
-= DESCRIPTION
+ set_tab_title("This goes into the tab title");
+
+ set_tab_title("Tab Title", "And also print this to the terminal");
-Term::Title provides an abstraction for setting the titlebar (or title tab)
+=head1 DESCRIPTION
+
+Term::Title provides an abstraction for setting the titlebar or the tab title
across different types of terminals. For *nix terminals, it prints the
-appropriate escape sequences to set the terminal title based on the value of
-{$ENV{TERM}}. On Windows, it uses [Win32::Console] to set the title directly.
+appropriate escape sequences to set the terminal or tab title based on the
+value of C<$ENV{TERM}>. On Windows, it uses L<Win32::Console> to set the
+title directly.
+
+Currently, changing the titlebar is supported in these terminals:
+
+=over 4
+
+=item *
+
+xterm
+
+=item *
+
+rxvt
+
+=item *
+
+screen
+
+=item *
+
+iTerm2.app
-Currently, supported terminals include:
+=item *
-* xterm
-* rxvt
-* screen
-* Win32 console
+Win32 console
-= USAGE
+=back
-== {set_titlebar()}
+The terminals that support changing the tab title include:
+
+=over 4
+
+=item *
+
+iTerm2.app
+
+=back
+
+=head1 USAGE
+
+=head2 set_titlebar
set_titlebar( $title, @optional_text );
-Sets the titlebar to {$title} or clears the titlebar if {$title} is
+Sets the titlebar to C<$title> or clears the titlebar if C<$title> is
undefined.
On terminals that require printing escape codes to the terminal, a newline
-character is also printed to the terminal. If { @optional_text } is given, it
+character is also printed to the terminal. If C< @optional_text > is given, it
will be printed to the terminal prior to the newline. Thus, to keep terminal
-output cleaner, use {set_titlebar()} in place of a {print()} statement to
+output cleaner, use C<set_titlebar()> in place of a C<print()> statement to
set the titlebar and print at the same time.
If the terminal is not supported, set_titlebar silently continues, printing
-{ @optional_text } if any.
+C<@optional_text> if any.
-= BUGS
+=head2 set_tab_title
-Please report any bugs or feature using the CPAN Request Tracker.
-Bugs can be submitted through the web interface at
-[http://rt.cpan.org/Dist/Display.html?Queue=Term-Title]
+ set_tab_title( $title, @optional_text );
-When submitting a bug or request, please include a test-file or a patch to an
-existing test-file that illustrates the bug or desired feature.
+Has the exact same semantics as the L</set_titlebar> but changes the tab title.
-= SEE ALSO
+=head1 SEE ALSO
-* [Win32::Console]
-* [http://www.ibiblio.org/pub/Linux/docs/HOWTO/Xterm-Title]
+=over 4
-= AUTHOR
+=item *
-David A. Golden (DAGOLDEN)
+L<Win32::Console>
-= COPYRIGHT AND LICENSE
+=item *
-Copyright (c) 2008 by David A. Golden. All rights reserved.
+L<http://www.ibiblio.org/pub/Linux/docs/HOWTO/Xterm-Title>
-Licensed under Apache License, Version 2.0 (the "License").
-You may not use this file except in compliance with the License.
-A copy of the License was distributed with this file or you may obtain a
-copy of the License from http://www.apache.org/licenses/LICENSE-2.0
+=back
-Files produced as output though the use of this software, shall not be
-considered Derivative Works, but shall be considered the original work of the
-Licensor.
+=for :stopwords cpan testmatrix url annocpan anno bugtracker rt cpants kwalitee diff irc mailto metadata placeholders metacpan
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
+=head1 SUPPORT
-=end wikidoc
+=head2 Bugs / Feature Requests
-=cut
+Please report any bugs or feature requests through the issue tracker
+at L<https://github.com/dagolden/Term-Title/issues>.
+You will be notified automatically of any progress on your issue.
+
+=head2 Source Code
+
+This is open source software. The code repository is available for
+public review and contribution under the terms of the license.
+
+L<https://github.com/dagolden/Term-Title>
+
+ git clone https://github.com/dagolden/Term-Title.git
+
+=head1 AUTHOR
+
+David Golden <dagolden@cpan.org>
+=head1 CONTRIBUTORS
+
+=over 4
+
+=item *
+
+Alexandr Ciornii <alexchorny@gmail.com>
+
+=item *
+
+Pedro Melo <melo@simplicidade.org>
+
+=back
+
+=head1 COPYRIGHT AND LICENSE
+
+This software is Copyright (c) 2008 by David Golden.
+
+This is free software, licensed under:
+
+ The Apache License, Version 2.0, January 2004
+
+=cut
@@ -1,114 +0,0 @@
-# Generated by Pod::WikiDoc version 0.18
-
-=pod
-
-=head1 NAME
-
-Term::Title - Portable API to set the terminal titlebar
-
-=head1 VERSION
-
-This documentation describes version 0.03.
-
-=head1 SYNOPSIS
-
- use Term::Title 'set_titlebar';
-
- set_titlebar("This goes into the title");
-
- set_titlebar("Title", "And also print this to the terminal");
-
-=head1 DESCRIPTION
-
-Term::Title provides an abstraction for setting the titlebar (or title tab)
-across different types of terminals. For *nix terminals, it prints the
-appropriate escape sequences to set the terminal title based on the value of
-C<<< $ENV{TERM} >>>. On Windows, it uses L<Win32::Console> to set the title directly.
-
-Currently, supported terminals include:
-
-=over
-
-=item *
-
-xterm
-
-=item *
-
-rxvt
-
-=item *
-
-screen
-
-=item *
-
-Win32 console
-
-=back
-
-=head1 USAGE
-
-=head2 C<<< set_titlebar() >>>
-
- set_titlebar( $title, @optional_text );
-
-Sets the titlebar to C<<< $title >>> or clears the titlebar if C<<< $title >>> is
-undefined.
-
-On terminals that require printing escape codes to the terminal, a newline
-character is also printed to the terminal. If C<<< @optional_text >>> is given, it
-will be printed to the terminal prior to the newline. Thus, to keep terminal
-output cleaner, use C<<< set_titlebar() >>> in place of a C<<< print() >>> statement to
-set the titlebar and print at the same time.
-
-If the terminal is not supported, set_titlebar silently continues, printing
-C<<< @optional_text >>> if any.
-
-=head1 BUGS
-
-Please report any bugs or feature using the CPAN Request Tracker.
-Bugs can be submitted through the web interface at
-L<http://rt.cpan.org/Dist/Display.html?Queue=Term-Title>
-
-When submitting a bug or request, please include a test-file or a patch to an
-existing test-file that illustrates the bug or desired feature.
-
-=head1 SEE ALSO
-
-=over
-
-=item *
-
-L<Win32::Console>
-
-=item *
-
-L<http://www.ibiblio.org/pub/Linux/docs/HOWTO/Xterm-Title>
-
-=back
-
-=head1 AUTHOR
-
-David A. Golden (DAGOLDEN)
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright (c) 2008 by David A. Golden. All rights reserved.
-
-Licensed under Apache License, Version 2.0 (the "License").
-You may not use this file except in compliance with the License.
-A copy of the License was distributed with this file or you may obtain a
-copy of the License from http:E<sol>E<sol>www.apache.orgE<sol>licensesE<sol>LICENSE-2.0
-
-Files produced as output though the use of this software, shall not be
-considered Derivative Works, but shall be considered the original work of the
-Licensor.
-
-Unless required by applicable law or agreed to in writing, software
-distributed under the License is distributed on an "AS IS" BASIS,
-WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-See the License for the specific language governing permissions and
-limitations under the License.
-
-
@@ -0,0 +1,26 @@
+severity = 5
+verbose = 8
+
+[Variables::ProhibitPunctuationVars]
+allow = $@ $!
+
+[TestingAndDebugging::ProhibitNoStrict]
+allow = refs
+
+[Variables::ProhibitEvilVariables]
+variables = $DB::single
+
+# Turn these off
+[-BuiltinFunctions::ProhibitStringyEval]
+[-ControlStructures::ProhibitPostfixControls]
+[-ControlStructures::ProhibitUnlessBlocks]
+[-Documentation::RequirePodSections]
+[-InputOutput::ProhibitInteractiveTest]
+[-References::ProhibitDoubleSigils]
+[-RegularExpressions::RequireExtendedFormatting]
+[-InputOutput::ProhibitTwoArgOpen]
+[-Modules::ProhibitEvilModules]
+
+# Turn this on
+[Lax::ProhibitStringyEval::ExceptForRequire]
+
@@ -0,0 +1,181 @@
+#!perl
+
+use strict;
+use warnings;
+
+# This test was generated by Dist::Zilla::Plugin::Test::ReportPrereqs 0.013
+
+use Test::More tests => 1;
+
+use ExtUtils::MakeMaker;
+use File::Spec::Functions;
+use List::Util qw/max/;
+use version;
+
+# hide optional CPAN::Meta modules from prereq scanner
+# and check if they are available
+my $cpan_meta = "CPAN::Meta";
+my $cpan_meta_req = "CPAN::Meta::Requirements";
+my $HAS_CPAN_META = eval "require $cpan_meta"; ## no critic
+my $HAS_CPAN_META_REQ = eval "require $cpan_meta_req; $cpan_meta_req->VERSION('2.120900')";
+
+# Verify requirements?
+my $DO_VERIFY_PREREQS = 1;
+
+sub _merge_requires {
+ my ($collector, $prereqs) = @_;
+ for my $phase ( qw/configure build test runtime develop/ ) {
+ next unless exists $prereqs->{$phase};
+ if ( my $req = $prereqs->{$phase}{'requires'} ) {
+ my $cmr = CPAN::Meta::Requirements->from_string_hash( $req );
+ $collector->add_requirements( $cmr );
+ }
+ }
+}
+
+my %include = map {; $_ => 1 } qw(
+
+);
+
+my %exclude = map {; $_ => 1 } qw(
+
+);
+
+# Add static prereqs to the included modules list
+my $static_prereqs = do { my $x = {
+ 'configure' => {
+ 'requires' => {
+ 'ExtUtils::MakeMaker' => '6.17'
+ }
+ },
+ 'develop' => {
+ 'requires' => {
+ 'Dist::Zilla' => '5.013',
+ 'Dist::Zilla::Plugin::OSPrereqs' => '0',
+ 'Dist::Zilla::Plugin::RemovePrereqs' => '0',
+ 'Dist::Zilla::PluginBundle::DAGOLDEN' => '0.060',
+ 'File::Spec' => '0',
+ 'File::Temp' => '0',
+ 'IO::Handle' => '0',
+ 'IPC::Open3' => '0',
+ 'Pod::Coverage::TrustPod' => '0',
+ 'Test::CPAN::Meta' => '0',
+ 'Test::More' => '0',
+ 'Test::Pod' => '1.41',
+ 'Test::Pod::Coverage' => '1.08'
+ }
+ },
+ 'runtime' => {
+ 'requires' => {
+ 'Exporter' => '0',
+ 'perl' => '5.006',
+ 'strict' => '0',
+ 'warnings' => '0'
+ }
+ },
+ 'test' => {
+ 'recommends' => {
+ 'CPAN::Meta' => '0',
+ 'CPAN::Meta::Requirements' => '2.120900'
+ },
+ 'requires' => {
+ 'ExtUtils::MakeMaker' => '0',
+ 'File::Spec::Functions' => '0',
+ 'List::Util' => '0',
+ 'Test::More' => '0',
+ 'version' => '0'
+ }
+ }
+ };
+ $x;
+ };
+
+delete $static_prereqs->{develop} if not $ENV{AUTHOR_TESTING};
+$include{$_} = 1 for map { keys %$_ } map { values %$_ } values %$static_prereqs;
+
+# Merge requirements for major phases (if we can)
+my $all_requires;
+if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META_REQ ) {
+ $all_requires = $cpan_meta_req->new;
+ _merge_requires($all_requires, $static_prereqs);
+}
+
+
+# Add dynamic prereqs to the included modules list (if we can)
+my ($source) = grep { -f } 'MYMETA.json', 'MYMETA.yml';
+if ( $source && $HAS_CPAN_META ) {
+ if ( my $meta = eval { CPAN::Meta->load_file($source) } ) {
+ my $dynamic_prereqs = $meta->prereqs;
+ delete $dynamic_prereqs->{develop} if not $ENV{AUTHOR_TESTING};
+ $include{$_} = 1 for map { keys %$_ } map { values %$_ } values %$dynamic_prereqs;
+
+ if ( $DO_VERIFY_PREREQS && $HAS_CPAN_META_REQ ) {
+ _merge_requires($all_requires, $dynamic_prereqs);
+ }
+ }
+}
+else {
+ $source = 'static metadata';
+}
+
+my @modules = sort grep { ! $exclude{$_} } keys %include;
+my @reports = [qw/Version Module/];
+my @dep_errors;
+my $req_hash = defined($all_requires) ? $all_requires->as_string_hash : {};
+
+for my $mod ( @modules ) {
+ next if $mod eq 'perl';
+ my $file = $mod;
+ $file =~ s{::}{/}g;
+ $file .= ".pm";
+ my ($prefix) = grep { -e catfile($_, $file) } @INC;
+ if ( $prefix ) {
+ my $ver = MM->parse_version( catfile($prefix, $file) );
+ $ver = "undef" unless defined $ver; # Newer MM should do this anyway
+ push @reports, [$ver, $mod];
+
+ if ( $DO_VERIFY_PREREQS && $all_requires ) {
+ my $req = $req_hash->{$mod};
+ if ( defined $req && length $req ) {
+ if ( ! defined eval { version->parse($ver) } ) {
+ push @dep_errors, "$mod version '$ver' cannot be parsed (version '$req' required)";
+ }
+ elsif ( ! $all_requires->accepts_module( $mod => $ver ) ) {
+ push @dep_errors, "$mod version '$ver' is not in required range '$req'";
+ }
+ }
+ }
+
+ }
+ else {
+ push @reports, ["missing", $mod];
+
+ if ( $DO_VERIFY_PREREQS && $all_requires ) {
+ my $req = $req_hash->{$mod};
+ if ( defined $req && length $req ) {
+ push @dep_errors, "$mod is not installed (version '$req' required)";
+ }
+ }
+ }
+}
+
+if ( @reports ) {
+ my $vl = max map { length $_->[0] } @reports;
+ my $ml = max map { length $_->[1] } @reports;
+ splice @reports, 1, 0, ["-" x $vl, "-" x $ml];
+ diag "\nVersions for all modules listed in $source (including optional ones):\n",
+ map {sprintf(" %*s %*s\n",$vl,$_->[0],-$ml,$_->[1])} @reports;
+}
+
+if ( @dep_errors ) {
+ diag join("\n",
+ "\n*** WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING ***\n",
+ "The following REQUIRED prerequisites were not satisfied:\n",
+ @dep_errors,
+ "\n"
+ );
+}
+
+pass;
+
+# vim: ts=4 sts=4 sw=4 et:
@@ -2,7 +2,7 @@
# Copyright (c) 2008 by David Golden. All rights reserved.
# Licensed under Apache License, Version 2.0 (the "License").
# You may not use this file except in compliance with the License.
-# A copy of the License was distributed with this file or you may obtain a
+# A copy of the License was distributed with this file or you may obtain a
# copy of the License from http://www.apache.org/licenses/LICENSE-2.0
use strict;
@@ -10,7 +10,12 @@ use warnings;
use Test::More;
-plan tests => 5;
+if ( $ENV{NONINTERACTIVE_TESTING} || $ENV{AUTOMATED_TESTING} ) {
+ plan skip_all => "test require user interaction";
+}
+else {
+ plan tests => 8;
+}
#--------------------------------------------------------------------------#
# y_n
@@ -28,19 +33,21 @@ sub y_n {
return $answer =~ /^y/i;
}
-
#--------------------------------------------------------------------------#
# tests start here
#--------------------------------------------------------------------------#
+require_ok('Term::Title');
-require_ok( 'Term::Title' );
-
-can_ok( 'Term::Title', 'set_titlebar', '_is_supported' );
+can_ok(
+ 'Term::Title', 'set_titlebar', 'set_tab_title', '_is_supported',
+ '_is_supported_tabs'
+);
-Term::Title->import('set_titlebar');
+Term::Title->import( 'set_titlebar', 'set_tab_title' );
can_ok( 'main', 'set_titlebar' );
+can_ok( 'main', 'set_tab_title' );
# reclaim STDOUT from Test::More
local *STDOUT;
@@ -50,24 +57,46 @@ diag "Term appears to be '$ENV{TERM}'";
SKIP:
{
- skip "Automated testing not supported", 2
- if $ENV{AUTOMATED_TESTING};
+ skip "Automated testing not supported title bars", 2
+ if $ENV{AUTOMATED_TESTING};
- skip "Term::Title not supported on this terminal type", 2
- unless Term::Title::_is_supported();
+ skip "Term::Title (set term title) not supported on this terminal type", 2
+ unless Term::Title::_is_supported();
my $phrase = "Hello";
- set_titlebar("[$phrase]","# Setting title to ", "'[$phrase]'");
+ set_titlebar( "[$phrase]", "# Setting title to ", "'[$phrase]'" );
print STDERR "\n# (y/n)\n";
- my $y_n = y_n(
- "Do you see '[$phrase]' in the title bar (or tab) of this window?"
- );
+ my $y_n = y_n("Do you see '[$phrase]' in the title bar of this window?");
ok( $y_n, "Title set correctly" );
# clear
set_titlebar();
- $y_n = y_n( "Has the title bar (or tab) been cleared?" );
+ $y_n = y_n("Has the title bar been cleared?");
ok( $y_n, "Title cleared correctly" );
+ set_titlebar('set_titlebar() works!');
+}
+
+SKIP:
+{
+ skip "Automated testing not supported for tab titles", 2
+ if $ENV{AUTOMATED_TESTING};
+
+ skip "Term::Title (set tab title) not supported on this terminal type", 2
+ unless Term::Title::_is_supported_tabs();
+
+ my $phrase = "Hello";
+
+ set_tab_title( "[$phrase]", "# Setting title to ", "'[$phrase]'" );
+ print STDERR "\n# (y/n)\n";
+ my $y_n = y_n("Do you see '[$phrase]' in the tab title of this window?");
+ ok( $y_n, "Tab title set correctly" );
+
+ # clear
+ set_tab_title();
+ $y_n = y_n("Has the tab title been cleared?");
+ ok( $y_n, "Tab title cleared correctly" );
+
+ set_tab_title('set_tab_title() works!');
}
@@ -0,0 +1,5 @@
+; Install Code::TidyAll
+; run "tidyall -a" to tidy all files
+; run "tidyall -g" to tidy only files modified from git
+[PerlTidy]
+select = {lib,t}/**/*.{pl,pm,t}
@@ -0,0 +1,53 @@
+use 5.006;
+use strict;
+use warnings;
+
+# this test was generated with Dist::Zilla::Plugin::Test::Compile 2.039
+
+use Test::More tests => 1 + ($ENV{AUTHOR_TESTING} ? 1 : 0);
+
+
+
+my @module_files = (
+ 'Term/Title.pm'
+);
+
+
+
+# fake home for cpan-testers
+use File::Temp;
+local $ENV{HOME} = File::Temp::tempdir( CLEANUP => 1 );
+
+
+my $inc_switch = -d 'blib' ? '-Mblib' : '-Ilib';
+
+use File::Spec;
+use IPC::Open3;
+use IO::Handle;
+
+open my $stdin, '<', File::Spec->devnull or die "can't open devnull: $!";
+
+my @warnings;
+for my $lib (@module_files)
+{
+ # see L<perlfaq8/How can I capture STDERR from an external command?>
+ my $stderr = IO::Handle->new;
+
+ my $pid = open3($stdin, '>&STDERR', $stderr, $^X, $inc_switch, '-e', "require q[$lib]");
+ binmode $stderr, ':crlf' if $^O eq 'MSWin32';
+ my @_warnings = <$stderr>;
+ waitpid($pid, 0);
+ is($?, 0, "$lib loaded ok");
+
+ if (@_warnings)
+ {
+ warn @_warnings;
+ push @warnings, @_warnings;
+ }
+}
+
+
+
+is(scalar(@warnings), 0, 'no warnings found') if $ENV{AUTHOR_TESTING};
+
+
@@ -0,0 +1,12 @@
+#!perl
+
+use strict;
+use warnings;
+
+use Test::More;
+use English qw(-no_match_vars);
+
+eval "use Test::Perl::Critic";
+plan skip_all => 'Test::Perl::Critic required to criticise code' if $@;
+Test::Perl::Critic->import( -profile => "perlcritic.rc" ) if -e "perlcritic.rc";
+all_critic_ok();
@@ -0,0 +1,27 @@
+use strict;
+use warnings;
+use Test::More;
+
+# generated by Dist::Zilla::Plugin::Test::PodSpelling 2.006007
+use Test::Spelling 0.12;
+use Pod::Wordlist;
+
+
+add_stopwords(<DATA>);
+all_pod_files_spelling_ok( qw( bin lib ) );
+__DATA__
+titlebar
+rxvt
+iTerm
+David
+Golden
+dagolden
+Alexandr
+Ciornii
+alexchorny
+Pedro
+Melo
+melo
+lib
+Term
+Title
@@ -1,9 +0,0 @@
-use strict;
-use warnings;
-use File::Spec;
-use Test::More;
-require Test::Perl::Critic;
-
-my $rcfile = File::Spec->catfile( 'xt', 'perlcriticrc' );
-Test::Perl::Critic->import( -profile => $rcfile );
-all_critic_ok( 'lib', 'examples' );
@@ -1,20 +0,0 @@
-severity = 5
-verbose = 8
-
-[Variables::ProhibitPunctuationVars]
-allow = $@ $!
-
-# Turn these off
-[-BuiltinFunctions::ProhibitStringyEval]
-[-ControlStructures::ProhibitPostfixControls]
-[-ControlStructures::ProhibitUnlessBlocks]
-[-Documentation::RequirePodSections]
-[-InputOutput::ProhibitInteractiveTest]
-[-Miscellanea::RequireRcsKeywords]
-[-References::ProhibitDoubleSigils]
-[-RegularExpressions::RequireExtendedFormatting]
-[-InputOutput::ProhibitTwoArgOpen]
-
-# Turn this on
-[Lax::ProhibitStringyEval::ExceptForRequire]
-
@@ -1,30 +0,0 @@
-# pod-coverage.t
-# Copyright (c) 2008 by David Golden. All rights reserved.
-# Licensed under Apache License, Version 2.0 (the "License").
-# You may not use this file except in compliance with the License.
-# A copy of the License was distributed with this file or you may obtain a
-# copy of the License from http://www.apache.org/licenses/LICENSE-2.0
-
-use Test::More;
-
-my $min_tpc = 1.08;
-eval "use Test::Pod::Coverage $min_tpc";
-plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage"
- if $@;
-
-my $min_pc = 0.17;
-eval "use Pod::Coverage $min_pc";
-plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage"
- if $@;
-
-my @modules = all_modules('lib');
-
-plan tests => scalar @modules;
-
-for my $mod ( @modules ) {
- my $doc = "lib/$mod";
- $doc =~ s{::}{/}g;
- $doc = -f "$doc\.pod" ? "$doc\.pod" : "$doc\.pm" ;
- pod_coverage_ok( $mod, { pod_from => $doc } );
-}
-
@@ -1,14 +0,0 @@
-# pod-format.t
-# Copyright (c) 2008 by David Golden. All rights reserved.
-# Licensed under Apache License, Version 2.0 (the "License").
-# You may not use this file except in compliance with the License.
-# A copy of the License was distributed with this file or you may obtain a
-# copy of the License from http://www.apache.org/licenses/LICENSE-2.0
-
-use Test::More;
-
-my $min_tp = 1.22;
-eval "use Test::Pod $min_tp";
-plan skip_all => "Test::Pod $min_tp required for testing POD" if $@;
-
-all_pod_files_ok();
@@ -0,0 +1,6 @@
+#!perl
+# This file was automatically generated by Dist::Zilla::Plugin::MetaTests.
+
+use Test::CPAN::Meta;
+
+meta_yaml_ok();
@@ -0,0 +1,8 @@
+#!perl
+
+use Test::More;
+
+eval "use Test::MinimumVersion";
+plan skip_all => "Test::MinimumVersion required for testing minimum versions"
+ if $@;
+all_minimum_version_ok( qq{5.010} );
@@ -0,0 +1,7 @@
+#!perl
+# This file was automatically generated by Dist::Zilla::Plugin::PodCoverageTests.
+
+use Test::Pod::Coverage 1.08;
+use Pod::Coverage::TrustPod;
+
+all_pod_coverage_ok({ coverage_class => 'Pod::Coverage::TrustPod' });
@@ -0,0 +1,6 @@
+#!perl
+# This file was automatically generated by Dist::Zilla::Plugin::PodSyntaxTests.
+use Test::More;
+use Test::Pod 1.41;
+
+all_pod_files_ok();
@@ -0,0 +1,12 @@
+#!perl
+
+use strict;
+use warnings;
+
+use Test::More;
+
+eval 'use Test::Portability::Files';
+plan skip_all => 'Test::Portability::Files required for testing portability'
+ if $@;
+options(test_one_dot => 0);
+run_tests();
@@ -0,0 +1,22 @@
+use strict;
+use warnings;
+use Test::More;
+
+# generated by Dist::Zilla::Plugin::Test::Version 0.002004
+BEGIN { eval "use Test::Version; 1;" or die $@; }
+
+my @imports = ( 'version_all_ok' );
+
+my $params = {
+ is_strict => 0,
+ has_version => 1,
+};
+
+push @imports, $params
+ if version->parse( $Test::Version::VERSION ) >= version->parse('1.002');
+
+
+Test::Version->import(@imports);
+
+version_all_ok;
+done_testing;
@@ -1,15 +0,0 @@
-use Test::More;
-use IO::File;
-
-my $min_tps = 0.11;
-eval "use Test::Spelling $min_tps";
-plan skip_all => "Test::Spelling $min_tps required for testing POD" if $@;
-system( "ispell -v" ) and plan skip_all => "No ispell";
-
-set_spell_cmd( "ispell -l" );
-
-my $swf = IO::File->new('xt/stopwords.txt');
-my @stopwords = grep { length } map { chomp; $_ } <$swf>;
-add_stopwords( @stopwords );
-
-all_pod_files_spelling_ok();
@@ -1,10 +0,0 @@
-CPAN
-CTRL
-DAGOLDEN
-Foo
-MSWin
-README
-STDERR
-STDOUT
-XS
-html