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.
perl-dam/README.md

55 lines
2.5 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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](LICENSE) file —or browse the full text at <https://opensource.org/licenses/MIT>for details.