Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

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

Hello choroba 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. How are you getting %movies_data from the module to the script below?
    #!/usr/bin/perl use strict; use warnings; # Movie is the only package name I found in the module, # so I'm guessing it is also the module's name. use Movie; for my $title (sort keys %movies_data) { my $movie = 'Movie'->new( title => $title, map { (my $t = $_) =~ s/ /_/; $t => $movies_data{$title}{$_} } keys %{ $movies_data{$title} }); print $movie->movie_is, "\n"; }
    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.
  2. Why did you constrain media and based_on? media could grow to include web series, music videos, and even video games (interactive movies). based_on includes so much more than the few things I included in the sample data. There are movies based on video games, board games, role-playing games, plays, etc. I'm waiting for the SyFy Original movie Qwerty vs. Dvorak which would be based on computer equipment without a company.
  3. How would your code handle movies with the start year "tbd"?
  4. It is easy to strip off the Moo formatting to make it normal OO? My web host does not have Moo installed.
  5. Does this code work in perl 5.8.8?

A side note: run_time is not as bad as some of the other subroutines in the module which are truly hairy.

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 examining the Monastery: (4)
As of 2024-04-24 03:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found