Enviar búsqueda
Cargar
Path::Tiny
•
0 recomendaciones
•
2,563 vistas
W
waniji
Seguir
Chiba.pm #5 LT
Leer menos
Leer más
Tecnología
Denunciar
Compartir
Denunciar
Compartir
1 de 15
Descargar ahora
Descargar para leer sin conexión
Recomendados
PuppetCamp SEA 1 - Version Control with Puppet
PuppetCamp SEA 1 - Version Control with Puppet
Walter Heck
Huong dan cai dat hadoop
Huong dan cai dat hadoop
Quỳnh Phan
Cpsh sh
Cpsh sh
Ben Pope
Raspberry pi Part 4
Raspberry pi Part 4
Techvilla
Perl Fitxers i Directoris
Perl Fitxers i Directoris
frankiejol
Up.Php
Up.Php
wsoom
R- create a table from a list of files.... before webmining
R- create a table from a list of files.... before webmining
Gabriela Plantie
17 sessions
17 sessions
Abhijit Gaikwad
Recomendados
PuppetCamp SEA 1 - Version Control with Puppet
PuppetCamp SEA 1 - Version Control with Puppet
Walter Heck
Huong dan cai dat hadoop
Huong dan cai dat hadoop
Quỳnh Phan
Cpsh sh
Cpsh sh
Ben Pope
Raspberry pi Part 4
Raspberry pi Part 4
Techvilla
Perl Fitxers i Directoris
Perl Fitxers i Directoris
frankiejol
Up.Php
Up.Php
wsoom
R- create a table from a list of files.... before webmining
R- create a table from a list of files.... before webmining
Gabriela Plantie
17 sessions
17 sessions
Abhijit Gaikwad
File system
File system
Gayane Aslanyan
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Puppet
Plone Conference 2008 Lightning Talk Static Zope Rpx
Plone Conference 2008 Lightning Talk Static Zope Rpx
Paris, France
Puppet Camp Amsterdam 2015: Manifests of Future Past
Puppet Camp Amsterdam 2015: Manifests of Future Past
Puppet
Not Really PHP by the book
Not Really PHP by the book
Ryan Kilfedder
Perl5i
Perl5i
Marcos Rebelo
Ch3(working with file)
Ch3(working with file)
Chhom Karath
TDC São Paulo 2016 - Become a jedi with php streams
TDC São Paulo 2016 - Become a jedi with php streams
Matheus Marabesi
Logrotate sh
Logrotate sh
Ben Pope
Introduction to DBIx::Lite - Kyoto.pm tech talk #2
Introduction to DBIx::Lite - Kyoto.pm tech talk #2
Hiroshi Shibamura
scdevsumit 2016 - Become a jedi with php streams
scdevsumit 2016 - Become a jedi with php streams
Matheus Marabesi
Laporan setting dns
Laporan setting dns
Septian Adi
Important info
Important info
luvitadev
PHP Basics and Demo HackU
PHP Basics and Demo HackU
Anshu Prateek
Php i basic chapter 4
Php i basic chapter 4
Muhamad Al Imran
PHP pod mikroskopom
PHP pod mikroskopom
Saša Stamenković
News of the Symfony2 World
News of the Symfony2 World
Fabien Potencier
Linux Shell Scripts and Shell Commands✌️
Linux Shell Scripts and Shell Commands✌️
Nazmul Hyder
Threading
Threading
b290572
PerlでWeb API入門
PerlでWeb API入門
Yusuke Wada
spug_2008-08
spug_2008-08
colinmeyer
wget.pl
wget.pl
Yasuhiro Onishi
Más contenido relacionado
La actualidad más candente
File system
File system
Gayane Aslanyan
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Puppet
Plone Conference 2008 Lightning Talk Static Zope Rpx
Plone Conference 2008 Lightning Talk Static Zope Rpx
Paris, France
Puppet Camp Amsterdam 2015: Manifests of Future Past
Puppet Camp Amsterdam 2015: Manifests of Future Past
Puppet
Not Really PHP by the book
Not Really PHP by the book
Ryan Kilfedder
Perl5i
Perl5i
Marcos Rebelo
Ch3(working with file)
Ch3(working with file)
Chhom Karath
TDC São Paulo 2016 - Become a jedi with php streams
TDC São Paulo 2016 - Become a jedi with php streams
Matheus Marabesi
Logrotate sh
Logrotate sh
Ben Pope
Introduction to DBIx::Lite - Kyoto.pm tech talk #2
Introduction to DBIx::Lite - Kyoto.pm tech talk #2
Hiroshi Shibamura
scdevsumit 2016 - Become a jedi with php streams
scdevsumit 2016 - Become a jedi with php streams
Matheus Marabesi
Laporan setting dns
Laporan setting dns
Septian Adi
Important info
Important info
luvitadev
PHP Basics and Demo HackU
PHP Basics and Demo HackU
Anshu Prateek
Php i basic chapter 4
Php i basic chapter 4
Muhamad Al Imran
PHP pod mikroskopom
PHP pod mikroskopom
Saša Stamenković
News of the Symfony2 World
News of the Symfony2 World
Fabien Potencier
Linux Shell Scripts and Shell Commands✌️
Linux Shell Scripts and Shell Commands✌️
Nazmul Hyder
Threading
Threading
b290572
PerlでWeb API入門
PerlでWeb API入門
Yusuke Wada
La actualidad más candente
(20)
File system
File system
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Absolute Beginners Guide to Puppet Through Types - PuppetConf 2014
Plone Conference 2008 Lightning Talk Static Zope Rpx
Plone Conference 2008 Lightning Talk Static Zope Rpx
Puppet Camp Amsterdam 2015: Manifests of Future Past
Puppet Camp Amsterdam 2015: Manifests of Future Past
Not Really PHP by the book
Not Really PHP by the book
Perl5i
Perl5i
Ch3(working with file)
Ch3(working with file)
TDC São Paulo 2016 - Become a jedi with php streams
TDC São Paulo 2016 - Become a jedi with php streams
Logrotate sh
Logrotate sh
Introduction to DBIx::Lite - Kyoto.pm tech talk #2
Introduction to DBIx::Lite - Kyoto.pm tech talk #2
scdevsumit 2016 - Become a jedi with php streams
scdevsumit 2016 - Become a jedi with php streams
Laporan setting dns
Laporan setting dns
Important info
Important info
PHP Basics and Demo HackU
PHP Basics and Demo HackU
Php i basic chapter 4
Php i basic chapter 4
PHP pod mikroskopom
PHP pod mikroskopom
News of the Symfony2 World
News of the Symfony2 World
Linux Shell Scripts and Shell Commands✌️
Linux Shell Scripts and Shell Commands✌️
Threading
Threading
PerlでWeb API入門
PerlでWeb API入門
Similar a Path::Tiny
spug_2008-08
spug_2008-08
colinmeyer
wget.pl
wget.pl
Yasuhiro Onishi
BASH Variables Part 1: Basic Interpolation
BASH Variables Part 1: Basic Interpolation
Workhorse Computing
Perl Bag of Tricks - Baltimore Perl mongers
Perl Bag of Tricks - Baltimore Perl mongers
brian d foy
What's New in Perl? v5.10 - v5.16
What's New in Perl? v5.10 - v5.16
Ricardo Signes
On secure application of PHP wrappers
On secure application of PHP wrappers
Positive Hack Days
The Magic Of Tie
The Magic Of Tie
brian d foy
Perl Programming - 03 Programming File
Perl Programming - 03 Programming File
Danairat Thanabodithammachari
Perl basics for Pentesters
Perl basics for Pentesters
Sanjeev Kumar Jaiswal
Blog Hacks 2011
Blog Hacks 2011
Yusuke Wada
Php
Php
Linh Tran
Bag of tricks
Bag of tricks
brian d foy
Zendcon 2007 Api Design
Zendcon 2007 Api Design
unodelostrece
WordPress 運用を支える Perl
WordPress 運用を支える Perl
鉄次 尾形
My shell
My shell
Ahmed Salah
Utility Modules That You Should Know About
Utility Modules That You Should Know About
joshua.mcadams
AnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time web
clkao
Web 8 | Introduction to PHP
Web 8 | Introduction to PHP
Mohammad Imam Hossain
Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門
lestrrat
Why Hacking WordPress Search Isn't Some Big Scary Thing
Why Hacking WordPress Search Isn't Some Big Scary Thing
Chris Reynolds
Similar a Path::Tiny
(20)
spug_2008-08
spug_2008-08
wget.pl
wget.pl
BASH Variables Part 1: Basic Interpolation
BASH Variables Part 1: Basic Interpolation
Perl Bag of Tricks - Baltimore Perl mongers
Perl Bag of Tricks - Baltimore Perl mongers
What's New in Perl? v5.10 - v5.16
What's New in Perl? v5.10 - v5.16
On secure application of PHP wrappers
On secure application of PHP wrappers
The Magic Of Tie
The Magic Of Tie
Perl Programming - 03 Programming File
Perl Programming - 03 Programming File
Perl basics for Pentesters
Perl basics for Pentesters
Blog Hacks 2011
Blog Hacks 2011
Php
Php
Bag of tricks
Bag of tricks
Zendcon 2007 Api Design
Zendcon 2007 Api Design
WordPress 運用を支える Perl
WordPress 運用を支える Perl
My shell
My shell
Utility Modules That You Should Know About
Utility Modules That You Should Know About
AnyMQ, Hippie, and the real-time web
AnyMQ, Hippie, and the real-time web
Web 8 | Introduction to PHP
Web 8 | Introduction to PHP
Kansai.pm 10周年記念 Plack/PSGI 入門
Kansai.pm 10周年記念 Plack/PSGI 入門
Why Hacking WordPress Search Isn't Some Big Scary Thing
Why Hacking WordPress Search Isn't Some Big Scary Thing
Último
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
The Digital Insurer
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Juan lago vázquez
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
Dropbox
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
Nanddeep Nachan
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Remote DBA Services
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Orbitshub
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
sammart93
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
apidays
presentation ICT roal in 21st century education
presentation ICT roal in 21st century education
jfdjdjcjdnsjd
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
WSO2
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
apidays
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
apidays
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
johnbeverley2021
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
rafiqahmad00786416
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
Último
(20)
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
presentation ICT roal in 21st century education
presentation ICT roal in 21st century education
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Path::Tiny
1.
PATH::TINY Chiba.pm #5
/ @waniji
2.
ß…Ãu @waniji ´–Ï´£È§ò·Ê¡
VimsPerl„PrŠe
3.
PATH::TINYt{ Ô £êìfá·ä–ê Path::ClasszTinyh
File::Spec, File::Copy, File::Temp, File::Path, File::statvuž žoríR{vX|_zá·ä–ê1pslPkPca Še David Golden·XAuthor
4.
_Ÿv_tXcaŠe my $file
= path("/home/waniji/memo.txt"); # ファイル名のみ表示 say $file->basename; # ファイルに書き込み my $fh = $file->openw; $fh->print("chiba.pm") # ファイルの内容をすべて読み込み my $data = $file->slurp; # ファイルを削除 $file->remove; # 一時ファイルを作成 my $temp = Path::Tiny->tempfile;
5.
Æ¢ë®ÇéAzÔ £êDžª¥òÇ my $file
= path(/home/waniji/); my $iterator = $file-iterator( { recurse = 1 } ); while( my $object = $iterator-() ) { $count++ if $object-is_file; }
6.
Po}P/^•˜— # /home/waniji/chibapm/memo.txt
に aaa という文字列を書き込み my $file = path(/home/waniji/memo.txt); $file-parent-child(chibapm, memo.txt)-touchpath-openw-print(aaa);
7.
PATH::CLASStz‡¶ ŸaP íP
1Ô £ê UTF-8Jzà¼ÂÈXJa˜rP— Unix or Windows z‹”f;Ë
8.
ØòÀÝ–®(Ô £êw„YŸsg) my $path
= /home/waniji/hoge.txt; cmpthese( 10000, { 'Path::Tiny' = sub { my $file = path($path); $file-openw-print(aaa); $file-remove; }, 'Path::Class' = sub { my $file = file($path); $file-openw-print(aaa); $file-remove; }, }); Rate Path::Class Path::Tiny Path::Class 1862/s -- -29% Path::Tiny 2632/s 41% --
9.
ØòÀÝ–®(Æ¢ë®ÇéAzÔ £êžª¥òÇ) my $path
= /home/waniji/temp; cmpthese( 100, { 'Path::Tiny' = sub { my $dir = path($path); my $iterator = $dir-iterator( { recurse = 1 } ); my $count; while( my $object = $iterator-() ) { $count++ if $object-is_file; } }, 'Path::Class' = sub { my $dir = dir($path); my $count; $dir-recurse( callback = sub { my $object = shift; $count++ if -f $object; }); }, }); Rate Path::Class Path::Tiny Path::Class 10.7/s -- -67% Path::Tiny 32.1/s 200% --
10.
UTF-8zÔ £êžopencr‹— # Path::Class
my $fh = $file-open(':encoding(UTF-8)') or die can't open $file: $!; # Path::Tiny my $fh = $file-openr_utf8;
11.
PATH::TINYsÎÝok_t
12.
ì–ªêW•NFSwÔ £êž¤” my $file
= path(/home/waniji/memo.txt); $file-move(/nfs/memo.txt); ŒŒ ¾{±¿z¶{½ ‹Y^Y^Y^Y^Y‹
13.
Path::Tinyzmove{ÆósrenamežžJcrP—k| £v —Ô £ê¶¸Åßw¤”e—_t{cavP}
sub move { my ( $self, $dst ) = @_; return rename( $self-[PATH], $dst ) || $self-_throw( 'rename', $self-[PATH] . ' - '$dst' ); }
14.
PCŽ use File::Copy
'move'; move $file, /nfs/memo.txt;
15.
Št 6q
Descargar ahora