Skip to content

usevenus/bye

Repository files navigation

By Example

A hands-on introduction to Venus through annotated examples.

What is Venus?

Venus is a comprehensive object-oriented programming (OOP) library for Perl 5 that provides:

  • Modern OOP - Class building, role composition, and mixin support
  • Type System - Type checking, coercion, and assertions
  • Value Objects - OOP wrappers for Perl primitives (strings, arrays, hashes, etc.)
  • Zero Dependencies - Built entirely with Perl core modules
  • Perl 5.18+ - Backward compatible with older Perl versions

Venus brings modern programming patterns to Perl while respecting its roots and requiring no external dependencies.

About This Guide

Each topic includes runnable code examples with expected outputs. The examples are extracted from test files in the tests/ directory and rendered as POD documentation in the topics/ directory.

Project Structure

bye/
├── tests/
│   └── *.t # Topic test files (one per topic)
├── topics/
│   └── *.pod # Generated POD documentation
└── README.md

Topics

Getting Started

Core Types

Object-Oriented Programming

Type System

Collections

Strings & Patterns

Files & Paths

Date & Time

CLI & Environment

  • args - Command-line arguments
  • opts - Option parsing
  • vars - Environment variables
  • cli - CLI applications

Error Handling

Data Formats

  • json - JSON encoding/decoding
  • yaml - YAML encoding/decoding
  • dump - Data dumping

Utilities

Advanced Patterns


Running the Examples

Requires Venus 5.00

Each topic has a corresponding test file.

To run an individual test (using Venus):

vns test tests/hello-world.t

To run an individual test (using Perl prove):

PERL5LIB=/path/to/venus/lib prove -v tests/hello-world.t

To run all tests (using Venus):

vns tests

To run all tests (using Perl prove):

PERL5LIB=/path/to/venus/lib prove -v tests/

License

Apache License 2.0

See Also

About

Venus By Example

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages