diff --git a/.gitignore b/.gitignore index 1944fd6..83d7c6e 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ +# Temporary Files *.tmp diff --git a/README.md b/README.md index 62e2b39..0d9c12b 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,74 @@ Utility modules written in Perl, for Perl. - Author: Ethan Kletschke -- Version: `0.0.6` +- Version: `0.0.7` - Developed on: Ubuntu (WSL) - License: MIT - Project metadata file: [`project.yaml`](./meta/project.yaml) + +--- + +- [PerlUtils](#perlutils) + - [About This Project](#about-this-project) + - [Features](#features) + - [Running the Module Tests](#running-the-module-tests) + - [Validating the POD Documentation](#validating-the-pod-documentation) + +--- + +## About This Project + +PerlUtils is a library of Perl modules (created mostly as a skills reference) +that currently provides utility subroutines for text-file handling and array handling, +and is planned to also provide OS subroutines (i.e., making directories, running specific +utility commands, etc.), text processing subroutines, and other + +### Features + +- Various utility subroutines aimed at simplifing Perl programs + - Array subroutines (planned), such as: + - `is_empty()` + - `clear()` + - `populate()` + - Mathematical set subroutines (i.e., `union()`, `intersection()`, etc.) + - Text processing subroutines +- Extensive POD documentation validated with CI/CD (using `podchecker`) +- Comprehensive `Test::More` testing suite run with `prove` +- Bash scripts that run the testing suite and validate POD documentation + +## Running the Module Tests + +To run the module tests, navigate to the `src/` directory and run the following command: + +```bash +prove -lv t/* +``` + +Or in the root directory of the project, run the provided Bash script: + +```bash +./RunUnitTests.sh +``` + +Both will run the provided module tests in the `src/t/` directory using `prove`. + + +## Validating the POD Documentation + +To validate the project's POD documentation, run this in the project's root directory: + +```bash +find src -type f -name '*.pm' -exec podchecker {} \; +``` + +This will: + +1. Find every Perl module file ending with `.pm` +2. Execute the `podchecker` command against each `.pm` file +3. Display the output of the validation for each file + +Alternatively, you can also run the provided Bash script: + +```bash +./ValidatePod.sh +``` diff --git a/meta/BACKLOG.md b/meta/BACKLOG.md index 7f94574..ae03303 100644 --- a/meta/BACKLOG.md +++ b/meta/BACKLOG.md @@ -1,10 +1,30 @@ # Feature Backlog +_Last Updated: 2026-11-01, 07:19am_ + - [ ] `TextFiles` Module - - [ ] Log Parsing + - [ ] `TextFiles::LogFileParsing` - [x] Log type counter - [x] Log type filter (works like UNIX `grep` but more features(?)) - - [ ] CSV parsing - - [ ] General File Handling + - [ ] Log file validator + - Validates log lines against a provided RegEx format + - [ ] `TextFiles::ParseCSV` + - [ ] `validate_csv()` + - Validates that a file is a valid `.csv` file + - [ ] `TextFiles::Simple` - [x] `can_open()` subroutine - [x] `cant_open()` subroutine +- [ ] `Arrays` Module + - [ ] `Arrays::Simple` + - [ ] `is_empty()` subroutine + - [ ] `isnt_empty()` subroutine + - [ ] `clear()` subroutine + - Empties out an array + - [ ] `populate()` subroutine + - Appends items to an array using a list of arbitrary arguments + - [ ] `Arrays::Sets` + - [ ] Move `union()` subroutine + - [ ] `intersection()` subroutine + - [ ] `is_subset()` subroutine + - [ ] `difference()` subroutine + - [ ] `symmetric_difference()` subroutine diff --git a/meta/project.yaml b/meta/project.yaml index ff0694d..a9b4ee9 100644 --- a/meta/project.yaml +++ b/meta/project.yaml @@ -6,7 +6,7 @@ project-meta: - Perl status: Experimental license: MIT - version: 0.0.6 + version: 0.0.7 build: dev-environments: @@ -21,6 +21,7 @@ build: team: author: Ethan Kletschke + owner: Ethan Kletschke contributors: - name: Ethan Kletschke role: Author and Owner diff --git a/src/lib/Utils/Arrays/Simple.pm b/src/lib/Utils/Arrays/Simple.pm index 1fa625a..2ad3fe8 100644 --- a/src/lib/Utils/Arrays/Simple.pm +++ b/src/lib/Utils/Arrays/Simple.pm @@ -8,6 +8,7 @@ our @EXPORT_OK = qw( union ); +# TODO -> Move to a new file for array sets sub union { # Parameters my ($arr1, $arr2) = @_;