Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^2: Include Bootstrap Files in Perl Script?

by glennpm (Novice)
on May 10, 2016 at 20:27 UTC ( #1162661=note: print w/replies, xml ) Need Help??


in reply to Re: Include Bootstrap Files in Perl Script?
in thread Include Bootstrap Files in Perl Script?

Thanks Much NetWallah,

Forgive me for this but is the code you showed in your example in perl? I'm a programmer but mostly on .NET client side and don't understand perl much at all.

Would it be possible to show me complete .PL perl script showing the Bootstrap includes with the a simple button using the Bootstrap class in a form like below that I could run on my server to get a feel for perl using Bootstrap...

<form> <input class="btn btn-default" type="submit" value="Order Product" nam +e="submit"> </form>

I would greatly appreciate it. Thanks, Glenn

Replies are listed 'Best First'.
Re^3: Include Bootstrap Files in Perl Script?
by tangent (Vicar) on May 10, 2016 at 21:36 UTC
    You don't need to do anything special in Perl to include these files. Somewhere in your script it outputs HTML - it may also generate that HTML itself or read it in from an external file or template. What you need to do is find that place in your script and then insert the lines as shown by NetWallah into the output HTML. It could just be copy and paste - no Perl required.
Re^3: Include Bootstrap Files in Perl Script?
by jfroebe (Parson) on May 10, 2016 at 20:44 UTC

    Hi Glenn,

    Your question is pretty vague. Think about how you would form the question using C# or whichever .NET language you're used to. A better question would be, I have an old Perl script that uses CGI.pm that I need to update to add the following to the output but here is the (sanitized version) script I need to update simplified:

    Your code would go here.  Preferably it would be code that would execute but code snippets can also be used

    Perl is the uber-tool of doing just about anything. There are many many ways of doing something. How to add those css and javascript to your code will depend on what your code looks like, what modules, if any, are being used and whether it uses a template system.

    While we would love to help you, you have to help us help you :)

    Jason L. Froebe

    Tech Blog

      Thanks Jason,

      I've looked at the shopping cart screens on an iPhone and don't look too bad in term of a "shopping experience" but the <form> buttons are really small and you can't read the text in the buttons.

      These 2 perl scripts were written by a perl expert in 1997 and is basically a complete shopping cart I need to continue to use for various reasons. Even though I'm very technical, the code is "all over the place" and messy. Even the guy who wrote it confirms this.

      The first script is the first part of the shopping cart and the second one is the secure script that is on a SSL layer.

      Should I post the whole scripts in this forum you think in order to seek advice from the perl guru's here? They are both very long 13K-14K lines in 2 .PL files.

      Thanks, Glenn
        The first script is the first part of the shopping cart and the second one is the secure script that is on a SSL layer... They are both very long 13K-14K lines in 2 .PL files.
        Perhaps you do need to hire someone as that sounds very fragile. Try upwork.com - I know there are some Perl people on there who are also active on PerlMonks or StackOverflow. I would suggest only hiring one of those.
Re^3: Include Bootstrap Files in Perl Script?
by NetWallah (Canon) on May 11, 2016 at 04:36 UTC
    The only "perl" in the code I posted is the "print" statement - the remaining 99% is HTML, and shows how you can incorporate external CDN references to the jquery, bootstrap and tablesorter components.

    It would not be practical to post the 5k line complete script from whence that snippet came.
    Even if I did, it would raise a lot more questions than it answers - it is a hairy mess mixing up HTML, javascript and perl.
    Today, I would not write a mess like that. So I certainly would not want it used as a sample to generate more such monstrosities.

    To get familiar with Bootstrap, you need to work with plain HTML, javascript, jquery and bootstrap.

    Only after you get your head around these, should you approach building your own monstrosity, or messing with someone elses.

    I suggest you follow the advice posted belo this comment, and seek external assistance in getting your project into this decade.

    Good luck.

            This is not an optical illusion, it just looks like one.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2022-06-25 14:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My most frequent journeys are powered by:









    Results (83 votes). Check out past polls.

    Notices?