summaryrefslogtreecommitdiffstats
path: root/perl/perl-file-listing
diff options
context:
space:
mode:
Diffstat (limited to 'perl/perl-file-listing')
-rw-r--r--perl/perl-file-listing/README34
-rw-r--r--perl/perl-file-listing/perl-file-listing.SlackBuild20
-rw-r--r--perl/perl-file-listing/perl-file-listing.info6
3 files changed, 39 insertions, 21 deletions
diff --git a/perl/perl-file-listing/README b/perl/perl-file-listing/README
index a76cfefbaa..39d1843588 100644
--- a/perl/perl-file-listing/README
+++ b/perl/perl-file-listing/README
@@ -1,23 +1,31 @@
-This module exports a single function called parse_dir(), which can
-be used to parse directory listings.
+This module exports a single function called parse_dir(), which can be
+used to parse directory listings.
+
The first parameter to parse_dir() is the directory listing to parse.
It can be a scalar, a reference to an array of directory lines or a
glob representing a filehandle to read the directory listing from.
+
The second parameter is the time zone to use when parsing time stamps
in the listing. If this value is undefined, then the local time zone
is assumed.
+
The third parameter is the type of listing to assume. Currently
supported formats are 'unix', 'apache' and 'dosftp'. The default value
'unix'. Ideally, the listing type should be determined automatically.
-The fourth parameter specifies how unparseable lines should be treated.
-Values can be 'ignore', 'warn' or a code reference. Warn means that the
-perl warn() function will be called. If a code reference is passed, then
-this routine will be called and the return value from it will be incorporated
-in the listing. The default is 'ignore'.
+
+The fourth parameter specifies how unparseable lines should be
+treated. Values can be 'ignore', 'warn' or a code reference. Warn
+means that the perl warn() function will be called. If a code
+reference is passed, then this routine will be called and the return
+value from it will be incorporated in the listing. The default is
+'ignore'.
+
Only the first parameter is mandatory.
-The return value from parse_dir() is a list of directory entries. In a scalar
-context the return value is a reference to the list. The directory entries
-are represented by an array consisting of [ $filename, $filetype, $filesize,
-$filetime, $filemode ]. The $filetype value is one of the letters 'f', 'd',
-'l' or '?'. The $filetime value is the seconds since Jan 1, 1970. The
-$filemode is a bitmask like the mode returned by stat().
+
+The return value from parse_dir() is a list of directory entries. In
+a scalar context the return value is a reference to the list. The
+directory entries are represented by an array consisting of [
+$filename, $filetype, $filesize, $filetime, $filemode ]. The $filetype
+value is one of the letters 'f', 'd', 'l' or '?'. The $filetime value
+is the seconds since Jan 1, 1970. The $filemode is a bitmask like the
+mode returned by stat().
diff --git a/perl/perl-file-listing/perl-file-listing.SlackBuild b/perl/perl-file-listing/perl-file-listing.SlackBuild
index 13368d03d9..ee3459da46 100644
--- a/perl/perl-file-listing/perl-file-listing.SlackBuild
+++ b/perl/perl-file-listing/perl-file-listing.SlackBuild
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
# Slackware build script for perl-file-listing
@@ -22,10 +22,13 @@
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+cd $(dirname $0) ; CWD=$(pwd)
+
PRGNAM=perl-file-listing
-VERSION=${VERSION:-6.04}
+VERSION=${VERSION:-6.16}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
+PKGTYPE=${PKGTYPE:-tgz}
if [ -z "$ARCH" ]; then
case "$( uname -m )" in
@@ -35,13 +38,20 @@ if [ -z "$ARCH" ]; then
esac
fi
-CWD=$(pwd)
+# If the variable PRINT_PACKAGE_NAME is set, then this script will report what
+# the name of the created package would be, and then exit. This information
+# could be useful to other scripts.
+if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then
+ echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE"
+ exit 0
+fi
+
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
SRCNAM=File-Listing
-DOCFILES="Changes README"
+DOCFILES="Changes README Changes.original INSTALL LICENSE"
set -e
@@ -84,4 +94,4 @@ mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cd $PKG
-/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE
diff --git a/perl/perl-file-listing/perl-file-listing.info b/perl/perl-file-listing/perl-file-listing.info
index 7c26db5de4..c6679b9d57 100644
--- a/perl/perl-file-listing/perl-file-listing.info
+++ b/perl/perl-file-listing/perl-file-listing.info
@@ -1,8 +1,8 @@
PRGNAM="perl-file-listing"
-VERSION="6.04"
+VERSION="6.16"
HOMEPAGE="https://metacpan.org/pod/File::Listing"
-DOWNLOAD="https://cpan.metacpan.org/authors/id/G/GA/GAAS/File-Listing-6.04.tar.gz"
-MD5SUM="83f636b477741f3a014585bb9cc079a6"
+DOWNLOAD="https://cpan.metacpan.org/authors/id/P/PL/PLICEASE/File-Listing-6.16.tar.gz"
+MD5SUM="d4fc8b0c86633d1fa5bf75323720eadc"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES="perl-http-date"