Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
11 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -134,6 +134,7 @@ Mojo::File - File system paths | |
use Mojo::File; | ||
# Portably deal with file system paths | ||
my $path = Mojo::File->new('/home/sri/.vimrc'); | ||
say $path->slurp; | ||
say $path->basename; | ||
|
@@ -163,6 +164,7 @@ individually. | |
my $path = path; | ||
my $path = path('/home/sri/.vimrc'); | ||
my $path = path('/home', 'sri', '.vimrc'); | ||
my $path = path(File::Temp->newdir); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
s1037989
Contributor
|
||
Construct a new scalar-based L<Mojo::File> object, defaults to using the current | ||
working directory. | ||
|
@@ -295,6 +297,7 @@ Move the file. | |
my $path = Mojo::File->new; | ||
my $path = Mojo::File->new('/home/sri/.vimrc'); | ||
my $path = Mojo::File->new('/home', 'sri', '.vimrc'); | ||
my $path = Mojo::File->new(File::Temp->newdir); | ||
Construct a new L<Mojo::File> object, defaults to using the current working | ||
directory. | ||
|
This file contains 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
Can File::Temp be a part of Mojo::File?