 |
| User since: |
Apr 25, 2002 at 08:28 UTC
(24 years ago) |
| Last here: |
Nov 12, 2024 at 07:07 UTC
(1 year ago) |
| Experience: |
4008
|
| Level: | Priest (14) |
| Writeups: |
470
|
| CPAN ID: | ALEENA |
| Location: | Woodsboro, MD |
| User's localtime: |
Apr 19, 2026 at 13:55 EDT
|
| Scratchpad: |
View
|
| For this user: | Search nodes |
|
What I like about PerlMonks is the only expectation of me they have is I improve myself. To that end, PerlMonks go out of their way to give me the resources to do so. Also, I will more than likely be remembered most for the cookies I give out. :)
Over the years I have been here, most made me feel welcome here, but a few have made it plain my presence is very unwelcome. I hope to not push away those who have been friendly to me so far. I also hope that those who actively dislike me will soften their views after reading this, if they read it.
"I thought that once I get syntax OK, I would be out of the woods. That only makes the woods thicker when there is a problem." - by me
703rd Saint on 19 May 2017
Socialize with me
Goal
My programming goal is to completely rewrite my entire web site using Perl. This task is daunting as I have so many different ways I have to manipulate the data. I have gotten most of it figured out, though there are areas with which I am not quite happy.
The past
Coming from the world of markup languages into the world of programming languages was extremely daunting for me and still is upon occasion. Not knowing the right questions to ask, the correct terminology, or even what to put into searches made me feel very, very anxious. I am interested in what can be done in Perl. Until I get a grip on those areas where I am weak, would you please be extremely patient with me?
Annoyance caused me to state when my currant project was finished, you would never hear from me again. My feelings got hurt and my project was at a complete standstill when my temper got the best of me (which it does quite often when my feelings are hurt).
I had to see perl in a new light to get my project into motion again. When I wrote my first working module, I really got things going.
Coding history
A little less than a decade ago, I got 10 megabytes of complimentary web space from my internet service provider along with several e-mail addresses. Wanting to put my mark on the net, I created my first web page in Microsoft Word. Everything was going fine. My site got bigger and bigger, and Word even gave me frames. It was when I wanted to put some code on my site from somewhere else when the need to know how to write HTML caught up with me. No matter what I did in Word, the block would not go where I wanted it. I got the message, learn how to write a web page. Before that moment I did not care about the markup, I just wanted my pages to look pretty.
At first I found a site here and there which told me what all those things meant in between the < and >. With just the basics, I started to rewrite my site. I kept the frames and still did a lot wrong. I had depreciated tags everywhere. The amount of <font> tags was enough to make some throw their hands up in the air in exasperation. Not only did I have a lot of depreciated tags, I had tags unclosed. I just plain did not get it.
It took some very patient people talking me through my hysterics when something on my site did not work to finally get my site looking better and most areas working right. Then I ran out of space. I had filled my 10 megabytes rather quickly. Hysterics ensued. That is when someone casually mentioned CSS. When I saw what one line of CSS could do to cut my page size down, I nearly cried (or did I actually feel a tear?). Within weeks the size of my site was down by more than 75%. After that my whole coding philosophy became small is beautiful.
Let's pause for a moment. At the time the only browser on my computer was Internet Explorer. I was still a very lazy writer, so some of my HTML was browser specific. I was not writing for the masses, just those who were using IE. Then along came Firefox becoming the cause for a fresh bought of hysterics. I still have a few cross browser issues, but they are not critical.
The main issue causing my headaches was my frames looked bad in Firefox. So, I had to find another way of making my pages look and act the same without frames. Then I was introduced to <divs>s and in CSS scrolling. The problem with getting rid of the frames was I would have to put the same stuff on all of the pages, making them bigger. I did not want that. Then I was introduced to Server Side Includes. It was a miracle to me. I could put all kinds of stuff into one file and have it read by another. So slowly and up until six years ago, I had been altering all of my pages to have SSI.
I was talking to several people here on PerlMonks. When I told them that I was using SSI to add markup to my pages, I was told Perl could do the same thing. I was wondering, would Perl be smaller than SSI; and the answer is a resounding YES!
The present
I still have a lot of hurdles to overcome before I get anywhere near good at Perl. I have been told that I have come a long way from when I started here; yet with the amount that I have left to learn, it seems that I am still at the beginning. I am getting better at reading the perldocs and finding modules that may work for me. I have also developed a few peeves which may or may not stick with me as I learn more.
Have a cookie for making it this far into my node! I am impressed with your resilience! I tend to babble when given the chance. Have another if you intend to continue reading. :)
Web frameworks
Lately some have been suggesting strongly that I use one of the more popular perl web frameworks like Mojolicious or Dancer2. They seem to be good suggestions. However, I went and looked at their tutorials and got lost on the very first bit of code they both showed and did not understand what they were doing.
|
Mojolicious
|
Dancer2
|
#!/usr/bin/env perl
use Mojolicious::Lite;
get '/' => sub {
my $c = shift;
$c->render(text => 'Hello World!');
};
app->start;
|
#!/usr/bin/env perl
use Dancer2;
get '/' => sub {
return 'Hello World!';
};
start;
|
Neither started off with HTML as I expected web frameworks to do. I expected the first line to be print "Content-Type: text/html; charset=utf-8 \n\n"; or <!DOCTYPE html>. If I am to convert my code over to Mojolicious or Dancer2 code, I need to see HTML at the top. My code produces HTML, I do not know what their code is doing, but it is not HTML as I expected. Also, neither state whether or not they support HTML5, which I happily use.
I have not gotten my head around some of the most basic modules normally used by perl programmers. The two more commons ones that I do not use because I have not figured them out are File::Find and Text::CSV. So, do you really think that someone who does not know how to use File::Find and Text::CSV is ready for Mojolicious or Dancer2? I am still using hand rolled code to get a list of files that should be done with File::Find and making hashes with hand rolled code instead of Text::CSV. (My make_hash subroutine is disliked by most.)
So, when you need a list of files, you type furiously for a minute in a wanted subroutine for File::Find, get the list of files you want, and have them processed all while I am still listing the files to see if my first conditional is working. When you have a separated values file you want to make a hash out of, you type a minute using Text::CSV and have a hash that you have processed while I am rereading the module POD again.
It may seem to flatter me that some of you believe that I am ready for the bigger concepts, but it is a reminder of just how little I know. I have a lot that is hand rolled where I should have used more popular (common) modules, but those modules are over my head still.
Recently, I looked at Text::CSV again and still could not write working code with it. I am also cargo culting code to get File::Find work in one place.
I will not ask for help to convert my site to either of those frameworks because you have families, jobs, and lives outside of PerlMonks. Converting my code to either of those frameworks would take a deep dive into my code and that would take days or even weeks. You have your own work to do that is more important than my little website. Just know that both frameworks, from the start, overwhelm me with concepts I have never seen before. I am not ready for them and do not know if I will ever be ready for them.
It takes me, sometimes, up to a dozen runs of a list to get a grep or map written correctly. I cargo cult when I use File::Find. I have not figured out Text::CSV. I do not know when or how to write object oriented code.
Objects
I have read and searched and read again about them, but they still do not make sense to me. I would need to see them in action with some code that I have already written to maybe get a grip on them. There are no promises on that score; ikegami, GrandFather, and others have tried to show me without it sinking in how they work. Because of my frustration with the topic, I am beginning to dislike almost everything to do with objects, even eschewing object oriented modules. I would rather write my own function then wrestle with an object to make it behave.
Update 1: I am giving them another try again. I hope this time that how to write them sinks in.
Update 2: They have confounded me again! I do not get it!
Update 3: I gave it yet another try, nothing. I still do not understand what is so wonderful about objects. So after Why won't a hash in a hash work as a hash reference to create an object?, RFC on how I'm doing when it comes to writing objects?, and How do I go from procedural to object oriented programming?; I give up. If one day my code morphs into objects on their own, I won't know it. To me objects are just a pain the a** especially since everyone tells me to separate my data out of them. Well, I can not do that. My data stays where it is with the subroutines that use it.
Over-complication
I have been told that I have a knack for this. There are times when reinventing the wheel is a good thing. For example, I was going to use DateTime to get the current week of the year when all I had to do was int($day_of_year / 7). Sure DateTime has something like that, but why go through all the trouble of setting it up, when something else much simpler is already around?
So called templates
I am sorry, but I can't see how any of these so called template modules really create a template that will fill in everything that I need them to fill in. HTML::Template appears to do only very basic stuff, but since I use so many conditionals and list iterations and loops, it won't work. Template Toolkit doesn't even look like perl, so I will stay as far away from that mess as possible. I don't need to get all mixed up right now. Printing the titles of my pages based on a slew of conditions seems beyond their capabilities, so how could I get them to print my site's menu and the right list of style sheets?
/*SQL*/ databases
Almost everyone I talk to here and elsewhere gets on my case about using a text based database system, with the directory structure being a part of it, over a SQL related database. I have tried to explain that I do not have access to either MySQL or SQLite on the server where my main site is, Xecu.net. When they tell me to move to somewhere that has either, I also try to explain that moving would mean a lot of trakking through the net trying to find everywhere I have a link to my site and changing the link. This is a lot of work.
I made attempts to check to see whether or not MySQL or SQLite was available to me on Xecu.net by trying to create a database at the command line. The results follow.
MySQL test...
/users/fantasy>mysql db_name
ERROR 2002 (HY000): Can't connect to local MySQL server through socket
+ '/tmp/mysql.sock' (2)
SQLite test...
/users/fantasy>sqlite3 test.db
sqlite3: Command not found.
The above tells me that they are not available, so I had to find an alternative, which I did in separated values files. I would have to have a database and the access and editing scripts for that database to test, but since I can't make a /*SQL*/ database, I can't play with the concept either.
The last problem with /*SQL*/ databases is that they are binary, meaning I would not be able to edit them in my text editor. If I can't get a decent front end up for my text based databases, I would be horribly disadvantaged with a binary one. I would have to keep all the text around somewhere to edit in my text editor just to stuff that text into the binary database. So, I will use what I have available to make databases.
I would like this to be the last time I have to defend my use of separated values. I try to stay away from the database topic as much as possible these days whenever it comes up.
Version control
There are two schools of thought for this one. A few seem to feel that I will crash and burn without it; while others say that since I am working alone, I don't need it. I have looked around and haven't found anything to my liking. There is the whole concept of storing all of the changes to my files that really is not appealing to me. There is also the lack of automation, where the changes are stored whenever I save in my favorite text editor. I spoke to a few of its developers who seemed interested but nothing came of it. Maybe once its integrated into my text editor and automatic, I will give version control a whirl.
Take a break
Wow! You read it all! The rest is just tools I use to write perl. Have a plate of cookies!
Toolbox
Coding Toolbox
- What I have:
- Unlimited web space
- Markup
- Scripting
- perl
- 5.28.1 (local)
- 5.16.3 (web host with #!/usr/bin/perl shebang [preferred shebang])
- 5.30.0 (web host with #!usr/local/cpanel/3rdparty/bin/perl shebang)
- javascript
- Programs
- What I don't have or understand:
Quote
"A man's knowledge is like an expanding sphere, the surface corresponding the boundary between the known and the unknown. As the sphere grows, so does its surface; the more a man learns, the more he realizes how much he does not know. Hence, the most ignorant man thinks he knows it all." - L. Sprague de Camp
Geek Code
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
G! d- s+:+ a+ C++ UL>++++>$ P++>$ W++>$ N !o !K w M--
PS+ PE Y+ t+(---) 5++ X+ R+++ tv+(--) b++ D- G e h- r++ x+
------END GEEK CODE BLOCK------
Last edited and updated: 2020-05-26
|
Posts by Lady_Aleena
|
Never say never
in Meditations
2 direct replies — Read more / Contribute
|
by Lady_Aleena
on May 05, 2015 at 23:37
|
|
|
A thud can be heard throughout the monastery as Lady Aleena's head hits her desk in the scriptorium. Shortly thereafter the sound of breaking glass filters through the monastery's halls as her preconceptions are shattered.
Never say you will never do a thing because, one day, you will do the thing then feel foolish.
Now here is some history and what happened tonight. I said I would never use pipes in my data fields. Tonight I did. Now I am feeling more than foolish. (And I've made more work for myself while trying to make less work for myself.) I just learned my lesson.
If you feel you are about to say "I will never...", stop, think very hard, count to ten, whatever. Just do not say it! One day you will be writing a piece of code, humming a little tune stuck in your head, then you will crash into a wall because you did not take into consideration the exception you just wrote.
Have a nice day!
I started this thought in the CB and continued it here.
No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
Lady Aleena
|
How do I go from procedural to object oriented programming?
in Seekers of Perl Wisdom
12 direct replies — Read more / Contribute
|
by Lady_Aleena
on Apr 20, 2015 at 16:43
|
|
|
(Jenda corrected me on what my subroutines are. They are procedures not functions. The title of this node and where ever the word, or any derivatives of, function has been changed to procedure.)
Going from procedural programming to object oriented programming has been on my mind a lot lately. I have been told by a couple of people my code is very close to being OO, however when I gave OO a try the first time, I was told I was doing it all wrong. I would like to see how close I am, but I am having a hard time learning objects because the tutorials I have found start writing code right away. I have yet to find a tutorial which starts with the objective of the objects being written. For example I want...
Criminal Minds is a 2005 television series which is still running.
Iron Man is a 2008 film based on comics by Marvel Comics.
The tutorials also do not show the data being munged up front like...
They all start right in on the objects, leaving me completely in the dark about what the end goal for the objects is. From above you know my objective and have the data to reference while reading the procedures I wrote to get to my objective. The whole module is here if you would like to see the bigger picture.
Now putting it all together to get my objective.
I would like to know how close I am to having objects, what they would look like if I am close, and if there is anything which does not fit into OO. Is there anywhere I need to change my thinking (which will be hard since I have been doing things as above for a long while now)?
If any of the OO tutorials were written with the objective, data, code, and wrap-up in that order; I might get them.
Another reason I am doing this is to get my mind off of my pain and impending surgery. I am doing everything I can think of to get my mind off of them and stave off panic. Would you please help me?
I hope I am not asking too much. Please sit back and enjoy a cookie.
No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
Lady Aleena
|
Chatbox too small
in Perl Monks Discussion
1 direct reply — Read more / Contribute
|
by Lady_Aleena
on Apr 16, 2015 at 17:45
|
|
|
Today I was trying to lengthen the chatbox on the FullPage Chat. I added the following to my css in my display settings, but the talk button didn't move so the chatbox was under the talk button.
.chatbox { width: 125%; }
Can we please get a longer chatbox? Currently only about 40 characters can be seen at a time. A longer chatbox would mean fewer typos, IMO. So pretty please with sugar cookies on top? ")
No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
Lady Aleena
|
Number functions I have lying around
in Cool Uses for Perl
2 direct replies — Read more / Contribute
|
by Lady_Aleena
on Mar 30, 2015 at 20:30
|
|
|
I was going through old scripts I had lying around and decided to clean them up a bit. I don't remember why I wrote them or what I am going to do with them. I think they are lukewarm uses for perl, and I probably reinvented the wheel on some of them. Instead of them just lying around my hard drive collecting dust, I share them with you, kind reader. Do with them what you will.
The first function lists primes, the second two functions list fractions, the last few are about Roman numerals. I lumped them together in a module called Numbers because I ran out of imagination.
Welcome to my sandbox.
If you want to see a Roman numeral (MDCCCMVCXXVII) with the overline, go to your display settings and set up the overline class in your style sheet as follows...
.overline { text-decoration: overline; }
No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
Lady Aleena
|
Please let the last message a user sent in the chatterbox time out?
in Perl Monks Discussion
2 direct replies — Read more / Contribute
|
by Lady_Aleena
on Dec 08, 2014 at 02:20
|
|
|
Hello. Today I went into the chatterbox to say "Hello". My simple "Hello" did not appear. I went to CBstream and found the last message I sent before this "Hello" was another "Hello". I think I sent it a few days ago. While I can see the wisdom behind not allowing repeated messages in the CB, would you please consider putting a time out of something like half a day or a day? Sometimes I don't want to freshen the cookies on the sideboard (and even if I did, I can't do it twice in a row).
Thank you.
No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
Lady Aleena
|
The hills are alive...
in Cool Uses for Perl
4 direct replies — Read more / Contribute
|
by Lady_Aleena
on Nov 26, 2014 at 22:25
|
|
|
..with The Sound of Music. ;)
I had @SoM_notes and $SoM sitting around doing nothing, so this evening, I made them do something. In make_SoM_song and get_SoM_def, you enter a string of alphabetical notes (c, d, e, f, g, a, b). The notes can be separated by a comma, semicolon, or a space. The functions will return the note name given by Maria von Trapp in The Sound of Music.
I wrote random_SoM_note and random_SoM_song because I couldnt' help myself. Most of you know how much I love to randomly generate things. :)
make_SoM_song, get_SoM_def, and random_SoM_song all return array references.
Enjoy the code!
package SoundofMusicSong;
use strict;
use warnings;
use Exporter qw(import);
our @EXPORT_OK = qw(make_SoM_song get_SoM_def random_SoM_note random_S
+oM_song);
my @base_notes = qw(c d e f g a b);
my @SoM_notes = qw(do re me fa so la te);
my %notes;
@notes{@base_notes} = @SoM_notes;
my $SoM = {
'do' => 'a deer a female deer',
're' => 'a drop of golden sun',
'me' => 'a name I call myself',
'fa' => 'a long long way to run',
'so' => 'a needle pulling thread',
'la' => 'a note to follow so',
'te' => 'a drink with jam and bread',
};
sub make_SoM_song {
my ($user_song) = @_;
my @song_notes = split(/[ ,;]/, $user_song);
my @new_song = map { $_ = $_ =~ /^[a-g]$/ ? $notes{$_} : 'not a note
+'; $_ } @song_notes;
return \@new_song;
}
sub get_SoM_def {
my ($user_song) = @_;
my $notes = make_SoM_song($user_song);
my @new_song = map { $_ = $$SoM{$_} ? $_.' '.$$SoM{$_} : 'not a note
+'; $_ } @$notes;
return \@new_song;
}
sub random_SoM_note {
my $note = $SoM_notes[rand @SoM_notes];
return $note;
}
sub random_SoM_song {
my ($number_of_notes) = @_;
my $notes = $number_of_notes ? $number_of_notes : int(rand(100)) + 1
+;
my @new_song;
push @new_song, random_SoM_note for (1..$notes);
return \@new_song;
}
1;
No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
Lady Aleena
|
I have a list expanding when I don't want it to
in Seekers of Perl Wisdom
1 direct reply — Read more / Contribute
|
by Lady_Aleena
on Nov 19, 2014 at 16:26
|
|
|
Hello everyone.
In the following function, I create two new keys for a hash which is entered into the function.
use List::Util qw(shuffle);
sub random {
my ($user_input, $list) = @_;
$list->{'all'} = [ map { @$_ } values %{$list} ];
$list->{'keys'} = [ grep {$_ !~ /(?:all|keys)/} keys %{$list} ];
if ($user_input && $user_input =~ /(?:help|options)/) {
return 'Your options are: '.join(', ',sort @{$$list{'keys'}}).', o
+r all.';
}
elsif ($user_input && $user_input =~ /dump/) {
use Data::Dumper;
return Dumper($list);
}
else {
my $input = $user_input ? $user_input : 'all';
my @random_list = shuffle(@{$$list{$input}});
return $random_list[rand @random_list];
}
}
The first time I run a list through random, the list for $list->{'all'} is just what I want it to be. However, upon subsequent runs of random, 'all' grows. I can't figure out why it is doing it. Here is an example...
my %waters = (
running => [qw(spring streamlet rivulet run brook creek stream rive
+r)],
standing => [qw(drop puddle pool pond lake sea ocean)],
precipitation => [qw(rain snow sleet hail)]
);
sub random_water {
my ($user_water) = @_;
random($user_water, \%waters);
}
After I run random_waters('dump'), I get...
The hash looks good here, however, when I run it twice...
'all' has grown, it even includes the keys, which shouldn't be possible as I create 'keys' after I create 'all'. I can't figure out why. %waters should grow between runs, right?
No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
Lady Aleena
|
RFC: Is there a better way to use Text::Balanced?
in Seekers of Perl Wisdom
3 direct replies — Read more / Contribute
|
by Lady_Aleena
on Nov 12, 2014 at 22:49
|
|
|
Hello. I have been writing a function to help me parse my lines. I had gotten help on this previously, however, I could not get it to work in Perl 5.8.8. I gave Text::Balanced a try and got it to work on my system. (I haven't uploaded the new code to my web host yet. I am trying to manage my expectations.) Before I get too excited about it, I ask for someone to look it over and let me know where I may encounter problems, if any. Have a cookie.
Here is the string I ran through my new inline function for the examples. I know it is long, but I will be parsing longer strings through inline.
The first thing I wanted to do was make sure any inline HTML comments I put in just for me are stripped. So I remove those first with s/\s\<!.+$// on line 15. Now the party can really start by extracting the brackets on line 17.
Since my lines can have more than one set of brackets in them, I have to use extract_multiple in conjunction with extract_bracketed. So, using those together, I get the following array.
I was looking at it, and in moments I figured out how to group the results. It appears every other value is what is the bracket found with the value before it being what comes before the bracket. The last value is what appears after the last bracket, if anything. To make it a little easier for me to munge the lines, I need to group them. So I wrote a little function called fancy_splice to group the lines together.
So, after putting the array returned by extract_multiple through fancy_splice, I get...
Now the party is in full swing with my lines with partners with the exception of the last guy standing alone at the end in this case. Because he is such a party pooper, I am going to deal with him first in lines 17 to 23 by assigning his value to $end. I pop off his group from the rest and send him to the bar.
Now I turn on the music and get the pairs dancing on line 25. The first partner I deal with is the lead, $bracket->[0]. On his tails is the tag which goes with the contents of the bracket (the last word of the value). So, I assign everything else in the lead to $start and put the last word into $tag.
Now, we will have to skip two loops ahead here to explain why $tag also needs munging. If you look at the first group's second value, you will see EurSUP. Well EurSUP is not an inline HTML tag, and I just want the SUP. So, lines 30 through 36 deal with getting the tags I want and rejoining the part, which is not the tag, with $start.
Now I am done dealing with the lead, it is time to deal with his partner which takes a bit more work. The first things I need to do are to name her $tagged and take her brackets off (line 38). I next look to see if the tag has any attributes, so I split $tagged by the pipes, in any. I then check the last value of the array has a > in it, and if not, pop it off the array and assign it to the $attribute. (If it did have a > in it, then it needs to be kept with the $in_tag because it may be the attribute of the next level tag or even the level after next.
When the dance is done for on set, I put the pieces together on line 43 and concatenate that piece to $line. When all the sets are done dancing, I bring $end back from the bar, and concatenate him too. All the dancing produces...
Thank you for taking the time to read this, have another cookie. Please let me know if you see a problem or a place where I can tighten things up.
No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
Lady Aleena
|
Using Data::Compare recursively to better identity differences between hashes
in Cool Uses for Perl
2 direct replies — Read more / Contribute
|
by Lady_Aleena
on Oct 18, 2014 at 01:49
|
|
|
Yesterday I wanted to compare two hashes to see if they were the same. I looked around a little bit and found Data::Compare. It was good at telling me the two hashes were different, however, it did not tell me where. So, I wrote a small little subroutine to recursively check my hash of hashes (of hashes). It was able to identity where I had to look to make corrections, almost to the exact spot. (I am unsure how to compare arrays of hashes just yet which is why the following little subroutine will almost take you to the right spot.)
There are still holes in the script, but it worked for me today.
#!/usr/bin/perl
use strict;
use warnings FATAL => qw( all );
use Data::Compare;
use Data::Dumper;
# You can take out all instances of the subroutine 'line' to print wha
+t you want in those places.
sub deep_data_compare {
my ($tab, $old_data, $new_data, $data) = @_;
my $old = $old_data;
my $new = $new_data;
my $compare = new Data::Compare($old, $new);
if ($compare->Cmp == 0) {
line($tab,$data) if $data;
if (ref($old) eq 'HASH' && ref($new) eq 'HASH') {
line($tab+1,'old to new');
for (keys %$old) {
deep_data_compare($tab+2,$_,$$old{$_},$$new{$_});
}
}
# I have not figured out this part yet.
# elsif (ref($old) eq 'ARRAY' && ref($new) eq 'ARRAY') {
# }
else {
print Dumper($new);
print Dumper($old);
}
}
}
sub rline {
my ($tab,$line) = @_;
return qq(\t) x $tab.qq($line\n);
}
sub line {
print rline(@_);
}
deep_data_compare(0, \%old_hash, \%new_hash, 'widgets');
No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
Lady Aleena
|
Add social networks to home nodes
in Perl Monks Discussion
2 direct replies — Read more / Contribute
|
by Lady_Aleena
on Jan 20, 2014 at 14:10
|
|
|
Recently I was asked by another monk for a Twitter to PerlMonks user handle decoder. I would love to be able to store my social network user names by my avatar instead of mixing it in with the text of my profile. Also, if a Monk fills in those fields, it might also be nice for a meta page with a list like Monks with Twitter accounts.
Facebook, Linkdin, etc. can be optional fields too with the accompanying "Monks with X accounts" pages. Just a thought.
No matter how hysterical I get, my problems are not time sensitive. So, relax, have a cookie, and a very nice day!
Lady Aleena
|
|