silent11's Journal http://use.perl.org/~silent11/journal/ silent11's use Perl Journal en-us use Perl; is Copyright 1998-2006, Chris Nandor. Stories, comments, journals, and other submissions posted on use Perl; are Copyright their respective owners. 2012-01-25T02:30:42+00:00 pudge pudge@perl.org Technology hourly 1 1970-01-01T00:00+00:00 silent11's Journal http://use.perl.org/images/topics/useperl.gif http://use.perl.org/~silent11/journal/ getting further with module-starter http://use.perl.org/~silent11/journal/34188?from=rss <p>After 15 minutes or so I passed all the built-in tests, noticing that a "coverage" test was skipped I wasn't quite filled with the sense of accomplishment I was after. I quickly installed the dependent Pod::Coverage and soon became aware to what a naked subroutine was.</p><p>30 minutes after that I was now passing all the built-in tests for my distribution that come with module-starter.</p><p>I was then able to leave my cube with a sense of success</p><p>Module::Starter is awesome. It has done a great job of holding my hand through the development of a real module distribution I hope to release to the CPAN.</p><p>I'm working my way through Perl Testing by Ian Langworth and chromatic in parallel with Sam Tregar's Writing Perl Modules for CPAN.</p><p>This next month will truly be a leaning experience for me. Getting into developing in a more ridged and structured way has really been fun. </p> silent11 2007-08-23T13:48:35+00:00 journal [yapcna2007] Things are really raming up... http://use.perl.org/~silent11/journal/32923?from=rss <p>YAPCNA2007 Activity Log:</p><p>There's been alot of activity in the mailing list. Ideas and visions are starting to take shape. Things are really starting to solidify.</p><p>Lots of work ahead -- lots of fun ahead.</p><p>Currently collecting info for the job fair, working with t-shirt vendor, and a few other things.</p> silent11 2007-04-06T04:49:11+00:00 journal YAPC::NA::Chicago http://use.perl.org/~silent11/journal/30027?from=rss /me from the back seat, "are we there yet?" silent11 2006-06-24T01:56:43+00:00 journal Hello World x 30 http://use.perl.org/~silent11/journal/28718?from=rss I'm in a training class today titled "Open Source Software in Libaries". The first topic was the instructor's definition of open sources. The second topic, Perl. Cool. The next thing was even cooler - I wittnessed everyone in the lab write their first hello world program in Perl. I actually got butterflies in my stomach. It's a difficult feeling to explain. silent11 2006-02-17T19:12:55+00:00 journal Rita http://use.perl.org/~silent11/journal/26827?from=rss <code> warn 'everyone' and exit('ASAP') if ($Rita-&gt;category &gt; 3) and ($monk{'location'} =~<nobr> <wbr></nobr>/Gulf Coast/); </code> silent11 2005-09-22T05:23:45+00:00 journal New Perl Books Arrived Today! http://use.perl.org/~silent11/journal/26435?from=rss <ul> <li>Simon Cozens, Advanced Perl Programming</li> <li>Damian Conway, Perl Best Practices</li> <li>Joseph Hall / Randal Schwartz, Effective Perl Programming</li> </ul><p> I'm really excited to get around to reading these. The only one I've ever thumbed through was Effective Perl Programming, I know it's old, but I remember it being full of hints, tips and techniques I never knew existed.</p> silent11 2005-08-23T18:46:07+00:00 journal Hope http://use.perl.org/~silent11/journal/26185?from=rss The more I read about p6 the more comfortable I am with *learning* a new perl. <p> http://pugscode.org/talks/yapc/index.html</p> silent11 2005-08-08T19:39:44+00:00 journal Pugs Installed http://use.perl.org/~silent11/journal/26094?from=rss Humm. Pugs wasn't that hard to install - the more I use linux the more I like it. <p> I'm not exactly sure what I'm going to do with pugs - I guess learn Perl 6. </p><p> Hummm. </p><p> Ummmm. </p><p> okay. </p><p> Oh, today's my birthday. </p><p> By the time people are using Perl 6 in production I hope I'm a manager or something... or programming Ruby.</p> silent11 2005-08-04T17:14:32+00:00 journal What a baby http://use.perl.org/~silent11/journal/25926?from=rss I'd been on this list for a few weeks, and I liked it. Too bad it's history now. <p> http://article.gmane.org/gmane.comp.lang.perl.modules.class-dbi/5073</p> silent11 2005-07-28T17:37:13+00:00 journal Ajax http://use.perl.org/~silent11/journal/25585?from=rss <a href="http://ajaxpatterns.org/"> <b>Ajax Patterns</b> </a> : Lots of good stuff on Ajax, I especially liked the page on <a href="http://ajaxpatterns.org/Ajax_Frameworks">Ajax Application Frameworks</a>. silent11 2005-07-08T13:04:25+00:00 journal Fed up with myself ( Class::DBI hurts my brain ) http://use.perl.org/~silent11/journal/25473?from=rss <b>Napoleon: <em>Gosh</em>!</b> <p> I can't wrap my brain around Class::DBI. I don't think I understand what exactly a <code>has_a</code> is or something. Or maybe it's Friday and it's been a loooooong week. </p><p> I'm writing this little code repository script (<code> that is quite weak</code>) just to get some practice with cdbi. </p><p> Here is my module </p><blockquote><div><p> <tt>package Repository::DBI;<br>&nbsp; &nbsp; &nbsp; &nbsp; use base 'Class::DBI';<br>&nbsp; &nbsp; &nbsp; &nbsp; Repository::DBI-&gt;set_db('Main','dbi:mysql:repository','root','mysql');<br> <br>packag e Repository::Users;<br>&nbsp; &nbsp; &nbsp; &nbsp; use base 'Repository::DBI';<br>&nbsp; &nbsp; &nbsp; &nbsp; Repository::Users-&gt;table('repository_users');<br>&nbsp; &nbsp; &nbsp; &nbsp; Repository::Users-&gt;columns(All =&gt; qw`users_id users_name users_email users_since users_password`);<br>&nbsp; &nbsp; &nbsp; &nbsp; Repository::Users-&gt;has_many('entries', "Repository::Entry" =&gt; 'entry_user_id');<br> <br>package Repository::Category;<br>&nbsp; &nbsp; &nbsp; &nbsp; use base 'Repository::DBI';<br>&nbsp; &nbsp; &nbsp; &nbsp; Repository::Category-&gt;table('repository_cat');<br>&nbsp; &nbsp; &nbsp; &nbsp; Repository::Category-&gt;columns(All =&gt; qw`cat_id cat_name cat_description`);<br>&nbsp; &nbsp; &nbsp; &nbsp; Repository::Category-&gt;has_many('entries', 'Repository::Entry' =&gt; 'entry_cat_id');<br> <br>package Repository::Entry;<br>&nbsp; &nbsp; &nbsp; &nbsp; use base 'Repository::DBI';<br>&nbsp; &nbsp; &nbsp; &nbsp; Repository::Entry-&gt;table('repository_entry');<br>&nbsp; &nbsp; &nbsp; &nbsp; Repository::Entry-&gt;columns(All =&gt; qw`entry_id entry_user_id entry_cat_id entry_code entry_description entry_mod_date entry_create_date`);<br>&nbsp; &nbsp; &nbsp; &nbsp; #Repository::Entry-&gt;has_a(user =&gt; 'Repository::Users');<br>&nbsp; &nbsp; &nbsp; &nbsp; #Repository::Entry-&gt;has_a(category =&gt; 'Repository::Category');</tt></p></div> </blockquote><p> The commented lines are the ones giving me trouble. </p><p> And my database: </p><blockquote><div><p> <tt># category table<br> <br>CREATE TABLE `repository_cat` (<br>&nbsp; `cat_id` int(11) NOT NULL auto_increment,<br>&nbsp; `cat_name` varchar(50) default NULL,<br>&nbsp; `cat_description` text,<br>&nbsp; PRIMARY KEY&nbsp; (`cat_id`)<br>) ENGINE=MyISAM;<br> <br># entry table<br> <br>CREATE TABLE `repository_entry` (<br>&nbsp; `entry_id` int(11) NOT NULL auto_increment,<br>&nbsp; `entry_user_id` int(11) NOT NULL default '0',<br>&nbsp; `entry_cat_id` int(11) default NULL,<br>&nbsp; `entry_code` longtext,<br>&nbsp; `entry_description` text,<br>&nbsp; `entry_mod_date` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,<br>&nbsp; `entry_create_date` date default NULL,<br>&nbsp; PRIMARY KEY&nbsp; (`entry_id`)<br>) ENGINE=MyISAM;<br> <br># users table<br> <br>CREATE TABLE `repository_users` (<br>&nbsp; `users_id` int(11) NOT NULL auto_increment,<br>&nbsp; `users_name` varchar(50) default NULL,<br>&nbsp; `users_email` varchar(225) default NULL,<br>&nbsp; `users_since` date default NULL,<br>&nbsp; `users_password` varchar(25) default NULL,<br>&nbsp; PRIMARY KEY&nbsp; (`users_id`)<br>) ENGINE=MyISAM;</tt></p></div> </blockquote><p> My script (below) only works with the last 2 lines in my<nobr> <wbr></nobr>.pm file commented out. </p><blockquote><div><p> <tt>1 #!/usr/bin/perl<br>2<br>3 use strict;<br>4 use lib '/home/will/lib/';<br>5 use Repository::DBI;<br>6<br>7<br>8 my $iterator = Repository::Users-&gt;retrieve_all;<br>9 print join("\t",qw/id name email/) , "$/"<nobr> <wbr></nobr>;<br>10 while (my $user = $iterator-&gt;next){<br>11&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;print join("\t",($user-&gt;users_id, $user-&gt;users_name, $user-&gt;users_email, $/));<br>12 }<br>~<br>~<br>~</tt></p></div> </blockquote> silent11 2005-07-01T20:43:32+00:00 journal CPANPLUS and installing lotsa modules at once http://use.perl.org/~silent11/journal/25464?from=rss I'm still getting my Linux box ready for development, and I've been installing a hella lota modules. I know <code>CPANPLUS</code> is already the easy way, but comon! There are like 40+ <code>Net::Amazon</code> modules and a ton for <code>Template::*</code> etc... <p> I tried <code> <b>CPAN Terminal&gt; </b> install Net::Amazon::*</code> but that didn't work. After looking in the docs I noticed that <code>CPANPLUS</code> accepts <code>install MODULE | NUMBER<nobr> <wbr></nobr>...</code>. Which installs modules by name or by search number. </p><p> Still, knowing the search number wouldn't save me time. Then I thought , wouldn't it be cool if I could do something like <code>install Net::Amazon 1..LAST_IN_SEARCH</code> </p><p> Well I searched on <code>Net::Amazon</code>, found that 41 modules existed, and issued a <code>i Net::Amazon 1..41</code> and do you know it WORKED! </p><p> This will save me soo much time, especially with the <code>Template::*</code> modules. </p><p> The only problem is that it wouldn't follow dependencies, which I do have <code>CPANPLUS</code> set up to do.</p> silent11 2005-07-01T14:20:33+00:00 journal One man show++ http://use.perl.org/~silent11/journal/25387?from=rss I do some web development on the side. I'm at the point where I can't do everything on my own -- juggling a full time *real* job, school, family, etc...<br> <br> At the same time, this development work I do is nowhere near enough to compensate for my *real* job -- however I'd love it if I could get away with it. <br> <br> So how does one go about finding a partner/employee to help with the work load? This person would need to be willing to work at wholesale, as well as being honest enough not to jump in bed with the client.<br> <br> I'm open to ideas. silent11 2005-06-27T20:56:03+00:00 journal Most Useful Academic Programming Language ... http://use.perl.org/~silent11/journal/25386?from=rss I need to decide which programming lauguage to study for a Computer Information Systems degree. The following are my options:<ul> <li>CIS 4304 Advanced Programming in C++</li> <li>CIS 4321 Advanced Programming in Visual Basic</li> <li>CIS 4325 Advanced Programming in COBOL</li> <li>CIS 4330 Advanced Programming in Java</li> </ul><p> I know a just a little of Java and VB, as for the others I know even less. </p><p> What I'd really like to know is which language will best </p><ol> <li>Help me further my understanding of programming concepts</li> <li>Help my resume &amp; earning potential</li> <li> Be of use in the real world</li> </ol><p> I'd love to hear your thoughts on this from some of you experienced programmers out there. Also, I may not get around to taking this class for a few semesters. In the event that VB is replaced with C# would your choice change? </p><p> Thanks</p> silent11 2005-06-27T20:33:14+00:00 journal Back to School http://use.perl.org/~silent11/journal/25384?from=rss Well, I've taken a long enough break from school. Our little tyke is 4 months old now, so tending to him is no longer an excuse ( especially since my wife stays at home with him ).<br> I've been going back and forth between the following degrees in various business schools: <br> <br> <code> $schools = {<br> 'University of Houston' = ['Entrepreneurship', 'MIS', 'Finance'],<br> 'University of Houston Downtown' = ['Finance', 'Computer Information Systems'],<br> 'Sam Houston State University' = ['General Business']<br> };<br> <br> </code> I've decided to go with <a href="http://www.dt.uh.edu/academic/colleges/business/facis/cis_index.htm#major">Computer Information Systems</a> at <a href="http://und.edu/">UHD</a>.<br> I feel good about my decision and I can't wait to start. silent11 2005-06-27T20:10:38+00:00 journal Getting back into things http://use.perl.org/~silent11/journal/25345?from=rss I've been idle with my Perl for quite some time now, more than a year. <br> perlcast.com, and some internal motivations have really motivated me to get back into perl! silent11 2005-06-24T15:26:12+00:00 journal BOM.pl http://use.perl.org/~silent11/journal/20633?from=rss <blockquote><div><p> <tt>#!/usr/bin/perl<br> <br>use strict;<br>use LWP::Simple;<br>use HTML::TokeParser;<br> <br># usage Links("URL","File Extension","Save Files to");<br># This will download the Book of Mormon in MP3 format.<br> <br>Links("http://lds.org/mp3/display/0,18692,5297-41,00.html", "mp3" , "./BofM/");<br> <br>sub Links<br>&nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; my $count = 0;<br>&nbsp; &nbsp; &nbsp; &nbsp; my $url&nbsp; &nbsp;= shift;<br>&nbsp; &nbsp; &nbsp; &nbsp; my $type&nbsp; = shift;<br>&nbsp; &nbsp; &nbsp; &nbsp; my $dir&nbsp; &nbsp;= shift;<br> <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if ( defined $dir )<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; # mkdir $dir || die $!;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print "$dir directory was created\n";<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br> <br>&nbsp; &nbsp; &nbsp; &nbsp; print "URL : $url \n TYPE: $type \n\n";<br> <br>&nbsp; &nbsp; &nbsp; &nbsp; unless ( defined $url )<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return("No URL Provided\n");<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; die $!;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; unless ( defined $type )<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; return("No Link Type Provided\n");<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; die $!;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br> <br>&nbsp; &nbsp; &nbsp; &nbsp; my $html = get( $url );<br> <br>&nbsp; &nbsp; &nbsp; &nbsp; my $page = HTML::TokeParser-&gt;new(\$html);<br> <br>&nbsp; &nbsp; &nbsp; &nbsp; while ( my $token = $page-&gt;get_tag("a"))<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;my $url = $token-&gt;[1]{href} || "-";<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;my $file = $url;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $file =~ s/^.+\///;<br> <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if ($url =~<nobr> <wbr></nobr>/$type$/i)<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; print "Getting $url as $file \n\n";<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sleep 3;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; getstore( $url , $dir . '/' . $file ) || die $!;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; $count ++;<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<br>&nbsp; &nbsp; &nbsp; &nbsp; }</tt></p></div> </blockquote> silent11 2004-08-30T13:53:58+00:00 journal Squid.pl http://use.perl.org/~silent11/journal/20632?from=rss <blockquote><div><p> <tt>use LWP::Simple 'getstore';<br> <br>for (1..140){<br>getstore('http://www.squidfingers.com/patterns/patterns/img_'.$_.'.g<nobr>i<wbr></nobr> f',$_.'.gif');<br>print qq~<br>&lt;table background="$_.gif" height="400" width="100%"&gt;<br>&lt;tr&gt;<br>&lt;td align="center" valign="middle"&gt;&lt;h1&gt;$_&lt;/h1&gt;&lt;/td&gt;<br>&lt;/tr&gt;<br>&lt;/table&gt;~<br>}</tt></p></div> </blockquote><p>usage: <br> <br> perl squid.pl &gt; out.html</p> silent11 2004-08-30T13:50:48+00:00 journal Houston Texas Perl Mongers http://use.perl.org/~silent11/journal/12311?from=rss With a population of over 4 million people you'd think that the Houston PM group could muster more than 3 steady participants to their meetings. David and I are trying frantically to get something together. {sigh} I know the group can be more active than it is now. silent11 2003-05-19T19:18:39+00:00 groups what next.... http://use.perl.org/~silent11/journal/11381?from=rss &lt;<i>sigh of frustration</i>&gt; I'm not sure what to do with myself..... So things are looking bleak, at best, at work. The workload is diminishing, our projects are ending, our responsiblities are vanishing. Mergers can do that to groups, especially unwanted groups. <p> What do I do? </p><ul> <li> look for another job</li> <li> return to school</li> <li> ride this job out and hope for the best</li> <li> eat lots of icecream</li> </ul><p> It wouldn't be that bad if I wasn't married, and if I had a degree, however, I am, and I don't. Currently I have the flexabality to work full tiem while going to school part time. The last 3 years hear have really been a blessing, a blessing that is drawing to an end. It makes me regret that I wasn't so ambitious towards school while I had it easy over the last little while. The way things are looking now I'm gonna be out of a job with no degree and *some* skills.</p><p> Going back to school full time would be FUN in my opinion, however It's not just me anymore. Being married is so interesting like that. Don't get me wrong, I wouldn't change a thing in my life, especially being married! It's just that we can both have the same aspirations and goals, with 2 different roads leading to the goal.</p><p> I'd rather get this school/degree thing out of the way ASAP and if I do find myself unemployed this would be the perfect time to do it. We are used to a certain standard of living tho, and I'd hate to yank that comfortable carpet out from underneath my wife with one big tug.</p><p> In my mind the only way to do both (education/income) would be to land some perfect job (even more perfect than the one I have now) where I could attend school during the day and work making serious bank at night.</p><p> I have faith that things will work out for us, it's just no fun waiting for the future sometimes.</p> silent11 2003-04-01T20:20:48+00:00 journal just another day http://use.perl.org/~silent11/journal/11022?from=rss It's just anoter day. -- <br> <br> <br> (10 secodns later)..... <br> <br> <br> ok, not just aonther day. I think Larry himself just said something to me in the CB over at perlmonks. <br> <br> cool... &nbsp;<nobr> <wbr></nobr>:) silent11 2003-03-13T19:31:25+00:00 journal last minute rodeo tix http://use.perl.org/~silent11/journal/10842?from=rss so <a href="http://lyons.tv/">steve</a> calls me at work and tells me that he's got 2 extra tickets to the rodeo. I'm not a big rodeo fan, however my wife is. So I agree to go with steve that we will go with him to the rodeo. Well even tho the rodeo has been a topic of great importance in our house the news of tix didn't come with any greatfulness. <p> maybe I'll get this right in my next life.</p><p>-silent11</p> silent11 2003-02-28T22:15:42+00:00 events back in black http://use.perl.org/~silent11/journal/10331?from=rss woooow, Has it been this long since I've logged in? anyway. I promise to be better. <br> &nbsp;-silent11 silent11 2003-02-01T02:57:43+00:00 journal First Entry http://use.perl.org/~silent11/journal/5256?from=rss Hello World!<br> This is a neat feature, I'll be sure to use it more often. silent11 2002-05-28T20:25:03+00:00 journal