Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^7: Debugging a module that's failing under taint mode

by kcott (Archbishop)
on Jul 04, 2021 at 22:39 UTC ( [id://11134642]=note: print w/replies, xml ) Need Help??


in reply to Re^6: Debugging a module that's failing under taint mode
in thread Debugging a module that's failing under taint mode

The following provides a few hints regarding some of the points you mentioned. They are based on a current $work project so, while I can't give too much away, I do know that in principle it works and the information is up-to-date (i.e. not like the historical examples I posted earlier).

Whenever I make a change to a module, that can be quite a bit of work in itself: the version must be changed in the code, POD, and potentially other places; I need to test the changes; I have to rerun the make cycle; and, a new distribution needs to be created and appropriately disseminated. Any modules that depend on the first module also need varying amounts of similar work: version updates; changes to Makefile.PL; and so on. I would much prefer to avoid all of this tedious effort wherever possible.

I assume by "framework" that you are referring to a basic layout to provide a consistent look-and-feel across different pages. I create a single template for all of these pages. The text for things like the title in the header, copyright date in the footer, and so on, is all held in configuration files. If, say, I find a typo somewhere, I just make a change to a configuration file. Pages reuse a single generic module.

I have situations where different JavaScript files need to be provided. My template has code like this:

<% BLOCK script_js %> <script src="<% request.uri_base %>/js/<% js_file %>"></script +> <% END %> <% FOREACH js_file = js_files %> <% PROCESS script_js %> <% END %>

My module code provides the list of *.js files (js_files) to the template; that then generates an appropriate list of <script> elements. Your list might include core.js and then, depending on the outcome of authentication, either guest.js, standard.js, or manager.js (of course, I'm completely guessing about your requirements and naming conventions).

I have similar code for generating a list of <link> elements for CSS files.

I wrote the module code to be generic from the outset. When the project moved from version 1 to version 2, I needed to make various changes or additions to config, template, JS and CSS files; however, the module remains unchanged at version 0.001.

— Ken

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11134642]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (2)
As of 2024-04-26 03:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found