aboutsummaryrefslogtreecommitdiff
path: root/vcrop
diff options
context:
space:
mode:
authorGuillermo Ramos2023-08-28 20:46:05 +0200
committerGuillermo Ramos2023-08-28 20:46:08 +0200
commit58862a4455b9679b97a59b458d63e8e1cf523989 (patch)
tree0e1e13557d16c45fdce315b06b3232dcb168961a /vcrop
parent7e9b8ec25d0491c130ce666a88649ba1e465ea32 (diff)
downloadcli-58862a4455b9679b97a59b458d63e8e1cf523989.tar.gz
vcrop: use function signatures
Diffstat (limited to 'vcrop')
-rwxr-xr-xvcrop6
1 files changed, 3 insertions, 3 deletions
diff --git a/vcrop b/vcrop
index e93ac8b..4703cbc 100755
--- a/vcrop
+++ b/vcrop
@@ -1,17 +1,17 @@
#!/usr/bin/env perl
+use v5.36;
use strict;
use warnings;
use File::Basename qw<fileparse>;
use File::Temp qw<tempdir>;
-sub usage {
+sub usage() {
die "Usage: $0 <file|url> crop1 [, crop2 ...]\n";
}
-sub crop {
- my ($file, $crop) = @_;
+sub crop($file, $crop) {
my ($from, $x, $y, $plus, $to) = $crop =~ /^(\d+(:\d{1,2}){0,2})(-(\+)?(\d+(:\d{1,2}){0,2}))?$/;
unless ($from) {
print "Error: invalid crop '$crop' (ignoring)\n";