world
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use feature qw(say); | |
use LWP::Simple; | |
my $content = get("http://aur.archlinux.org/packages/modern-perl/modern-perl/PKGBUILD"); | |
say substr($content, 281, 11); |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use feature qw(say); | |
use LWP::Simple; | |
my $content | |
= get('http://aur.archlinux.org/packages/perl-moose/perl-moose/PKGBUILD'); | |
say substr($content, 281, 11); |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use feature qw(say); | |
use LWP::Simple; | |
my $content | |
= get('http://aur.archlinux.org/packages/perl-moose/perl-moose/PKGBUILD'); | |
my $pos = index($content, 'pkgname'); |
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
#!/usr/bin/perl | |
use strict; | |
use warnings; | |
use feature qw(say); | |
use LWP::Simple; | |
my $content | |
= get('http://aur.archlinux.org/packages/perl-moose/perl-moose/PKGBUILD'); | |
( my $pkgname ) = ( $content =~ /pkgname=\'([\w-]+)\'/ ); |
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
#!perl | |
use strict; | |
use warnings; | |
use Template::Test; | |
my $tt = Template->new(); | |
my $vars = { | |
var => 'world', | |
}; |
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
my $template = | |
ref($what) eq 'ARRAY' | |
? join( ' + ', @{$what} ) | |
: ref($what) | |
? $what->name | |
: $what; |
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
my $template | |
# conditional # set $template to | |
= ref($what) eq 'ARRAY' ? join( ' + ', @{$what} ) | |
: ref($what) ? $what->name | |
: $what | |
; |
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
my $template | |
# conditional # set $template to | |
= ref($what) eq 'ARRAY' ? join( ' + ', @{$what} ) | |
: ref($what) eq 'SCALAR' ? '(evaluated block)' | |
: ref($what) ? $what->name | |
: $what | |
; |
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
my $template | |
# conditional # set $template to | |
= ref($what) eq 'Template::Document' ? $what->name | |
: ref($what) eq 'ARRAY' ? join( ' + ', @{$what} ) | |
: ref($what) eq 'SCALAR' ? '(evaluated block)' | |
: $what | |
; |