pplu / aws-sdk-perl

A community AWS SDK for Perl Programmers
Other
170 stars 94 forks source link

Extract Template data for ease of editing #226

Closed castaway closed 6 years ago

castaway commented 6 years ago

I'm being sponsored by ZipRecruiter to have a go at improving some of the Paws generated documentation. This is one of the items on my list.

Currently Paws::API::Builder stores several template toolkit templates as attribute strings. These would be easier to edit (for example in an editor with highlighting), if they were separated out into files on disk.

To make this work we would need to extract the files to disk, amend the process_template calling code to pass strings (file names) instead of attribute contents, and change the process_template method itself to use an INCLUDE_PATH. Special care will be needed with the overridden templates, eg in Paws::API::Builder::EC2, which could be put into a separate parallel directory.

As a less disruptive option the contents could be moved to the end of the code, into the DATA section. The Data::Section module can be used to store multiple pieces of content in the data section.

pplu commented 6 years ago

This would be a great enhancement to the Paws Builders