This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use v5.42; | |
| use Test2::V0; | |
| use experimental qw(builtin); | |
| use builtin qw(is_bool); | |
| subtest 'スカラーの場合' => sub { | |
| subtest '比較演算などの結果は boolean' => sub { | |
| my @case = ( | |
| 1==1, true, '1==1 is true', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use strict; | |
| use warnings; | |
| use utf8; | |
| use experimental qw(class); | |
| package HogeMouse { | |
| use Mouse; | |
| has foo => (is => 'rw', isa => 'Int'); | |
| has bar => (is => 'rw', isa => 'Int'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use v5.38; | |
| package User { | |
| sub is_admin($user) { | |
| $user->{role} eq 'admin' | |
| } | |
| sub is_editor($user) { | |
| $user->{role} eq 'editor' | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use v5.36; | |
| use Test2::V0; | |
| use Types::Common -types; | |
| sub Fn :prototype($$) { | |
| my ($Args, $Return) = @_; | |
| unless (ref $Args eq 'ARRAY') { | |
| Carp::croak "first argument must be an array reference (got $Args)"; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/server/src/hover.ts b/server/src/hover.ts | |
| index e469b56..dfb7e60 100644 | |
| --- a/server/src/hover.ts | |
| +++ b/server/src/hover.ts | |
| @@ -22,6 +22,20 @@ export function getHover(params: TextDocumentPositionParams, perlDoc: PerlDocume | |
| let hoverStr = buildHoverDoc(symbol, elem); | |
| if(!hoverStr) return; // Sometimes, there's nothing worth showing. | |
| + const BEFORE_CONTEXT_COUNT = 3; | |
| + const AFTER_CONTEXT_COUNT = 3; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use v5.32.0; | |
| use warnings; | |
| use Benchmark qw(cmpthese); | |
| use JSON::XS (); | |
| use Cpanel::JSON::XS (); | |
| use Cpanel::JSON::XS::Type; | |
| use JSON::Types; | |
| use constant Item => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use Benchmark qw(cmpthese); | |
| sub hello { return 'HELLO' } | |
| sub world { return 'WORLD' } | |
| sub hello2 { return 'HELLO' } | |
| *{"hello"} = bless \&hello, __PACKAGE__; | |
| hello(); | |
| my $hello = \&hello; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package Hello; | |
| use Types::Standard -types; | |
| use Function::Parameters; | |
| fun message(Str $msg) { | |
| return "HELLO $msg"; | |
| } | |
| 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use warnings; | |
| CHECK { | |
| warn "CALL check" | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use strict; | |
| use warnings; | |
| use JSON::XS qw(encode_json); | |
| use Benchmark qw(cmpthese); | |
| my $obj = [ map { | |
| +{ | |
| name => 'foo', | |
| age => 123, |
NewerOlder