A Perl library that simplifies the creation of interactive query forms and custom data listings through a menu-based interface, with fine-grained access control for users and groups.
This repository has been archived on 2025-06-22. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
Find a file
2025-06-22 10:30:42 +02:00
Dam Add function format_date_ymd() 2020-05-09 08:43:16 +02:00
www/dam Fix color assignments and add data table styles 2020-05-09 08:38:49 +02:00
LICENSE Add common license to project 2025-06-22 08:05:40 +02:00
README.md Minor documentation touch-ups 2025-06-22 10:30:42 +02:00

Perl-Dam

perl-dam is a modular Perl library that simplifies the creation of interactive query forms and filtered data listings through a menu-based interface. It includes reusable components to define UI filters, manage user sessions, generate SQL queries, and control data access securely.

Features

  • Build dynamic query forms with reusable filter controls
  • Generate custom data listings from SQL queries
  • Export results to CSV or generate printable PDF reports
  • Fine-grained access control for users and groups
  • Modular structure with customizable UI components and templates
  • Session management and error handling tools included

Project Layout

perl-dam/
├── Dam/                  # Core library
│   ├── Application.pm    # Highlevel application wrapper
│   ├── DamLogic.pm       # Session handling, rendering, permissions
│   ├── Database.pm       # Lightweight DBI wrapper + SQL helpers
│   ├── Debug.pm          # Debugging and logging utilities
│   ├── Util.pm           # Generic helper functions
│   ├── Var.pm            # Global constants
│   └── Components/       # Reusable UI pieces
│       ├── Controls/     # Filter widgets (Date.pm, Option.pm, Upload.pm…)
│       ├── Actions/      # Listing actions (Download.pm, Print.pm, Sort.pm)
│       ├── Templates/    # Template toolkit
│       └── Translations/ # Locale strings for UI texts
└── www/                  # Sample web frontend (static assets)
    └── dam/
        ├── css/          # Bootstrap + custom styles
        ├── js/           # jQuery, validators, menus, charting
        ├── fonts/        # Webfonts used by templates
        └── img/          # Icons and generic imagery

Key Modules

Module Purpose
Dam::DamLogic Central dispatcher; builds menus, enforces permissions, renders forms & listings.
Dam::Database Wraps DBI to assemble SQL from filter definitions and execute safely.
Dam::Components::Controls Individual widgets (DateRange, MultiCheck, Year…) used to build query forms.
Dam::Components::Actions Postlisting operations: CSV export, PDF generation, sorting.
Dam::Application Thin application entry point—integrate it in CGI/FCGI/PSGI scripts.

License

This project is licensed under the MIT License.
See the LICENSE file —or browse the full text at https://opensource.org/licenses/MITfor details.