Open-This

 view release on metacpan or  search on metacpan

META.json  view on Meta::CPAN

      },
      "test" : {
         "recommends" : {
            "CPAN::Meta" : "2.120900",
            "Git::Helpers" : "0.000016"
         },
         "requires" : {
            "Carp::Always" : "0",
            "ExtUtils::MakeMaker" : "0",
            "File::Spec" : "0",
            "Test::Differences" : "0",
            "Test::Fatal" : "0",
            "Test::More" : "0",
            "Test::Needs" : "0",
            "Test::Requires::Git" : "0",
            "Test::Script" : "1.29",
            "Test::Simple" : "1.302177",
            "Test::Warnings" : "0",
            "lib" : "0",
            "perl" : "v5.12.0"
         }

META.yml  view on Meta::CPAN

---
abstract: 'Try to Do the Right Thing when opening files'
author:
  - 'Olaf Alders <olaf@wundercounter.com>'
build_requires:
  Carp::Always: '0'
  ExtUtils::MakeMaker: '0'
  File::Spec: '0'
  Test::Differences: '0'
  Test::Fatal: '0'
  Test::More: '0'
  Test::Needs: '0'
  Test::Requires::Git: '0'
  Test::Script: '1.29'
  Test::Simple: '1.302177'
  Test::Warnings: '0'
  lib: '0'
  perl: v5.12.0
configure_requires:

Makefile.PL  view on Meta::CPAN

    "Pod::Usage" => 0,
    "Try::Tiny" => 0,
    "URI" => 0,
    "strict" => 0,
    "warnings" => 0
  },
  "TEST_REQUIRES" => {
    "Carp::Always" => 0,
    "ExtUtils::MakeMaker" => 0,
    "File::Spec" => 0,
    "Test::Differences" => 0,
    "Test::Fatal" => 0,
    "Test::More" => 0,
    "Test::Needs" => 0,
    "Test::Requires::Git" => 0,
    "Test::Script" => "1.29",
    "Test::Simple" => "1.302177",
    "Test::Warnings" => 0,
    "lib" => 0
  },
  "VERSION" => "0.000034",

Makefile.PL  view on Meta::CPAN

  "Browser::Open" => 0,
  "Carp::Always" => 0,
  "Cpanel::JSON::XS" => 0,
  "ExtUtils::MakeMaker" => 0,
  "File::Spec" => 0,
  "Getopt::Long" => 0,
  "Module::Runtime" => 0,
  "Module::Util" => "0.016",
  "Path::Tiny" => 0,
  "Pod::Usage" => 0,
  "Test::Differences" => 0,
  "Test::Fatal" => 0,
  "Test::More" => 0,
  "Test::Needs" => 0,
  "Test::Requires::Git" => 0,
  "Test::Script" => "1.29",
  "Test::Simple" => "1.302177",
  "Test::Warnings" => 0,
  "Try::Tiny" => 0,
  "URI" => 0,
  "lib" => 0,

cpanfile  view on Meta::CPAN

requires "URI" => "0";
requires "perl" => "v5.12.0";
requires "strict" => "0";
requires "warnings" => "0";
recommends "Git::Helpers" => "0.000016";

on 'test' => sub {
  requires "Carp::Always" => "0";
  requires "ExtUtils::MakeMaker" => "0";
  requires "File::Spec" => "0";
  requires "Test::Differences" => "0";
  requires "Test::Fatal" => "0";
  requires "Test::More" => "0";
  requires "Test::Needs" => "0";
  requires "Test::Requires::Git" => "0";
  requires "Test::Script" => "1.29";
  requires "Test::Simple" => "1.302177";
  requires "Test::Warnings" => "0";
  requires "lib" => "0";
  requires "perl" => "v5.12.0";
};

t/00-report-prereqs.dd  view on Meta::CPAN

                    },
       'test' => {
                   'recommends' => {
                                     'CPAN::Meta' => '2.120900',
                                     'Git::Helpers' => '0.000016'
                                   },
                   'requires' => {
                                   'Carp::Always' => '0',
                                   'ExtUtils::MakeMaker' => '0',
                                   'File::Spec' => '0',
                                   'Test::Differences' => '0',
                                   'Test::Fatal' => '0',
                                   'Test::More' => '0',
                                   'Test::Needs' => '0',
                                   'Test::Requires::Git' => '0',
                                   'Test::Script' => '1.29',
                                   'Test::Simple' => '1.302177',
                                   'Test::Warnings' => '0',
                                   'lib' => '0',
                                   'perl' => 'v5.12.0'
                                 }

t/ansible.t  view on Meta::CPAN

use strict;
use warnings;

use Open::This qw( parse_text );
use Path::Tiny qw( path );
use Test::More import => [qw( done_testing is )];
use Test::Differences qw( eq_or_diff );
use Test::Warnings    ();

# This gets really noisy on Travis if $ENV{EDITOR} is not set
local $ENV{EDITOR} = 'vim';

my $path = path('t/test-data/file-with-numbers-0.000020.txt')->absolute;

my @snippets = (
    qq{The error appears to be in '$path': line 14, column 16, but may be elsewhere in the file depending on the exact syntax problem.},
    qq{n '$path': line 14, column 16},

t/github.t  view on Meta::CPAN

use strict;
use warnings;

use Open::This        qw( to_editor_args );
use Test::Differences qw( eq_or_diff );
use Test::More import => [qw( done_testing )];
use Test::Warnings ();

# This gets really noisy on Travis if $ENV{EDITOR} is not set
local $ENV{EDITOR} = 'vim';

eq_or_diff(
    [
        to_editor_args(
            'https://github.com/oalders/open-this/blob/master/lib/Open/This.pm'

t/intellij.t  view on Meta::CPAN

#!/usr/bin/env perl

use strict;
use warnings;

use Open::This        qw( to_editor_args );
use Test::Differences qw( eq_or_diff );
use Test::More import => [qw( done_testing )];
use Test::Warnings ();

my @editors = ( 'idea', 'idea.sh', 'idea64', 'idea64.exe' );

for my $editor (@editors) {

    local $ENV{EDITOR} = $editor;

    eq_or_diff( [ to_editor_args('t/git.t') ], [ 't/git.t', ], 'filename' );

t/kate.t  view on Meta::CPAN

#!/usr/bin/env perl

use strict;
use warnings;

use Open::This        qw( to_editor_args );
use Test::Differences qw( eq_or_diff );
use Test::More import => [qw( done_testing )];
use Test::Warnings ();

local $ENV{EDITOR} = 'kate';

eq_or_diff(
    [ to_editor_args('t/git.t') ],
    [
        't/git.t',
    ],

t/nano.t  view on Meta::CPAN

#!/usr/bin/env perl

use strict;
use warnings;

use Open::This        qw( to_editor_args );
use Test::Differences qw( eq_or_diff );
use Test::More import => [qw( done_testing )];
use Test::Warnings ();

local $ENV{EDITOR} = 'nano';

eq_or_diff(
    [ to_editor_args('t/git.t:10:22') ],
    [
        '+10,22',
        't/git.t',

t/open-this.t  view on Meta::CPAN

use strict;
use warnings;

use Open::This  qw( editor_args_from_parsed_text parse_text to_editor_args );
use Path::Tiny  qw( path );
use Test::Fatal qw( exception );
use Test::More import => [qw( done_testing is like ok )];
use Test::Differences qw( eq_or_diff );
use Test::Warnings    qw( warnings );

{
    local $ENV{EDITOR} = q{};
    like(
        exception { editor_args_from_parsed_text('slow-horses.txt') },
        qr/\$EDITOR has not been set/,
        'dies when $EDITOR is not defined'
    );
}

t/vim.t  view on Meta::CPAN

#!/usr/bin/env perl

use strict;
use warnings;

use Open::This        qw( to_editor_args );
use Test::Differences qw( eq_or_diff );
use Test::More import => [qw( done_testing )];
use Test::Warnings ();

local $ENV{EDITOR} = 'vim';

eq_or_diff(
    [ to_editor_args('t/git.t:10:22') ],
    [
        '+call cursor(10,22)',
        't/git.t',

t/vscode_family.t  view on Meta::CPAN

#!/usr/bin/env perl

use strict;
use warnings;

use Open::This        qw( to_editor_args );
use Test::Differences qw( eq_or_diff );
use Test::More import => [qw( done_testing )];
use Test::Warnings ();

my @editors = ( 'code', 'codium' );

for my $editor (@editors) {

    local $ENV{EDITOR} = $editor;

    eq_or_diff(

t/which.t  view on Meta::CPAN

#!/usr/bin/env perl

use strict;
use warnings;

use Open::This        qw( to_editor_args );
use Test::Differences qw( eq_or_diff );
use Test::More import => [qw( done_testing is skip )];
use Test::Warnings ();

# This gets really noisy on CI if $ENV{EDITOR} is not set
local $ENV{EDITOR} = 'vim';

local $ENV{PATH} = 't/lib:t/bin';

is( Open::This::_which('foo'),      undef, 'binary not found' );
is( Open::This::_which('bin/date'), undef, 'binary with dir not found' );



( run in 0.812 second using v1.01-cache-2.11-cpan-131fc08a04b )