All Monks, Can you please help me clear my mind?
package christianDatabase; use strict; use warnings; use DBI; use Time::Piece::MySQL; my $timeNow = localtime; my $date = $timeNow->mysql_datetime; my $dbh = DBI->connect("dbi:mysql:christianDatabase", "xxxacctxxx" , " +xxxpassxxx") or die; sub new { my($class)= @_; bless{ },$class; } sub add_comment{ my($self, $comment, $username,) } sub make_comment_record{ } sub check_comment_record{ my($self, $MNid) = @_; $self->{_MNid} = $MNid; my $sql = "select MNref from comment_record where MNid=" . "\"$sel +f->{_MNid}\""; my $ccr = $dbh->prepare($sql); $ccr->execute() or die "$!"; my $cct = $ccr->fetchrow_array; return $cct; } sub add_new_news{#news Heading, full text, news photos, url my ($self, $newsHeading, $fullText, $NewsPhoto, $url) = @_; $self->{_news_heading} = $newsHeading; $self->{_news_text} = $fullText; $self->{_news_photo} = $NewsPhoto || ''; $self->{_news_url} = $url; my $newsid = &new_News(); my $sql = "insert into news (news_heading, full_text, news_photos, url, date, news +ID) values(\"$self->{_news_heading}\", \"$self->{_news_tex +t}\", \"$self->{_news_photo}\", \"$self->{_news_url}\", \"$date\", \" +$newsid\")"; print "\n\n$sql\n\n"; my $addNews = $dbh->prepare($sql); $addNews->execute() or die "$!"; return "News added"; }
I am trying to make a module for project. i am not blessing variable . though i am creating varibles in methods. It works fine i just want to know if anything is wrong with it. i need to add more methods and new variables to process. thanks

In reply to PerlOO what i am doing??? by seekperlwisdom

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



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.