Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

Hello SimonPratt and thank you for stopping by. I have a few specific questions about the code you provided. I will be writing up something more general as a reply to my OP to show the true breadth of the module.

  1. Is Perl 5.16.2 required? I write for 5.8.8 since that is what my web host provides.
  2. How are you getting %movies_data from the module to the script below?
    #!/usr/bin/perl use strict; use warnings; # movie is the first package name I found in the module, # so I'm guessing it is also the module's name. use movie; my $library = library->new(name => "Lucky's"); foreach my $movie (values %movies_data) { $library->add_movie(movie->new(%$movie)); } $library->print();
    I see %movies_data but I don't see how you got it from the module. %movies_data is not something I want to have to copy and paste to the three scripts which use it now.
  3. Why doesn't end_year get a value if it does not have one? It needs an end year for run_time which you seem to have dropped.

You do not need to worry about adding movies with this module. I enter the data into the file by hand since the last time I did anything with the data file with a script, I accidentally dropped a value causing me to have to redo my research for the value for a lot of movies.

The module I am possibly rewriting has 7 hashes, 5 of which get sent out to scripts from the module. Some values of the hashes use the subroutines and other hashes to create some of the values. It is a big complex organism.

No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
Lady Aleena

In reply to Re^2: How do I go from procedural to object oriented programming? by Lady_Aleena
in thread How do I go from procedural to object oriented programming? by Lady_Aleena

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (4)
As of 2024-04-19 02:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found