our? never seen that one...Kewl...I'll research and implement if that does the trick...thanks think of it as our package var , and my lexical var anyone fighting the good fight with Mail::IMAPClient ? [Tutorials] * S_Shrum wonders why anyone would buy a submersible toaster? Hmmmm..... * kodo thinks about if he ever used our but can't remember a single case [PodMaster] was that directed at me, ? Tutorials bo yea! That works! makes sense...my / our...I use MY all the time...shoulda just guessed no ~ s_shrum <3dan> [id://105446] is a good place for further reading [submersible_toaster] Better to think of it as "our lexically scoped global variable" but when does it go out of scope ? Does anyone know any nice examples of modules that use DBI to setup database modules for use in CGI scripts? Well, outside of use strict vars, there is really no reason for it... it doesn't exactly go out of scope... It just requires a package name when it isn't in the scope of the our decl. [submersible_toaster]: <code>perl -Mstrict -wle '{our $foo=1} prin t $foo'</code> Then try the same thing, but <code>print $main::foo</code> And if you are starting to wonder what "our" is good for... read [Why is 'our' good?] ... you're in good company. :-) ahHAH! ++[sauoq] thankyou for clearing that up. What is our good for. I could make a recommendation for Mail::IMAPClient but I am yet to determine exactly WTF is going on in there. "our" is a lexical declaration for package variables I talk about that in my alpaca book [merlyn], do you come up with any place where our is better then use vars, other then that the syntax is closer to my? all paco book? better in that it can initialize, yes. err [paco]? * theorbtwo notes that alpaca yarn is sooo sooooft. * theorbtwo starts to read the sample chapter, and chokes when the very first paragraph implies that a reference isn't a scalar pretty firmly. * 3dan tries to remove the alpaca hairball from [theorbtwo]'s throat where's that? Uh, 3ch, in the two introductory paragraphs. (I'd quote, but I'd just be quoting the whole para anyway.) i cannot remember - can i print an entire array to a file with just <code>print FILE @array;</code> --? Well, you say that it isn't a job for one of those three... it's a job for a reference. (or similar.) It's obvious to me that you just dumbed it down a bit. Pedantry isn't always good for learning. yes you can :-) Alexander: yes but why don't you try it out yourself? "A reference fits wherever a scalar fits. It can go..." Pg.7 P3 because this is the last thing i need add to the script before it is complete and i can goto bed right. I think I go to great pains to be the opposite of what [theorbtwo] is noting I'd say making that distinction is probably good for a learning book. * theorbtwo shrugs. A reference is not a scalar, but merely fits wherever a scalar fits. well, almost everywhere. it can't be the key of a hash I'd instead say that a reference is a special type of scalar. [theorbtwo] - what precisely is your problem? No, it's not a special type of scalar. Well, I do see how it could read that way... Saying a reference can go wherever a scalar goes falls just a tad short of saying "because a reference is in fact a scalar." But I'm sure you say that somewhere later... You do, right? it's not quite a scalar. it's neither a string nor a number nor undef. (neither can some scalars .9 a reference is not a scalar. every. errr "ever" a scalar can be used as a hash key, for example. equating references with scalars is more damaging than useful No, a string can be used as a hash key. References can't, because while they are scalars, they aren't strings. with binary data? but "a reference fits nearly everywhere a scalar fits" gives a useful storage model I think you have been misled, [theorbtwo] (Trying to use undef as a hash key results in actualy using the empty string, it appears.) i don't know anyone on P5P that would say "a reference is a scalar" "A scalar may contain one single value in any of three different flavors: a number, a string, or a reference." undef as a hash key uses "" instead, yes. Quoting from [perldoc://perldata]... * castaway quotes the Camel on scalars: A scalar always contains a single value. This may be a number, string, or a reference to another piece of data. I simply state the rule as "a hash key is a string, not a scalar", which rules out refs and undefs nicely, and leaves a clean mental model. * castaway grins at [sauoq] I'm trying to capture the semantics, but perhaps not using the terminology that casual usage would lead you to, perhaps. * sauoq notes that's because hash keys are stringified... that happens with references too. I don't necessarily view the Camel as the final definition of terminology. I use usage on P5P instead. And you can use them as hash keys... you just can't use hash keys as references. Oh. I use usage here, more or less, but mostly what makes sense to me. in any event, I'm presenting a model for learning. that should not get in your way... just move along... And what produces expectation most in line with what <code>perl</code> does. Why? Because hash keys always hold "strings." Not numbers, not scalars, not references... strings. * theorbtwo shrugs -- no matter how good the Alpaca was, I wouldn't buy it -- it doesn't attempt to teach material not in Camel, which I have, and like. [theorbtwo] - fine, that's not a tutorial book for you. and I bet you didn't use the llama either. but both of them are useful for people that are not as smart as you I might have bought it several years ago had it been out then... I think I've probably mastered the material pretty well by now though. :-) I don't equate Alpca (from what I've seen of it) with Camel at all. Camel is a reference + some explanation. Alpaca == tutorial (correct me if I'm wrong [merlyn]). many thousands - no millions, of people have found the llama useful. I suspect most of them will find the alpaca useful too. yes, the camel is a reference book. the llama + alpaca = tutorial books Sorry, [merlyn]. I don't mean to diss your teaching style; it's just different then mine. * sauoq has the pink llama on his shelf... It was the first book I bought on perl. And thank you [merlyn] for a gentle introduction... (and you're welcome... because I did -purchase- the book. ;-) there's nothing in the llama and alpaca that isn't covered in the camel - but just in a different way. I have the pink camel on my shelf too. I got that about a week later. and nearly everyone who has learned Perl seems to have learned it from the llama. that's cool froeme. Noddage, [merlyn]. I wouldn't say that the camel isn't a tutorial, just not a tutorial for beginning programmers. It taught me all I wanted to know about perl4... so thanks for that too, [merlyn]... and you're welcome again. Pink Camel? so [theorbtwo] - I have no problem with you learning from reference books. just realize that others need more handholding, and there's nothing wrong with that. [arguile], the first editions had pink, rather the cyan, covers. no, there's really nothing in the Camel that is a "tutorial" in the traditional sense. it's merely the manpages republished. more reference than anythign else. (Camel++) but for those who want a tutorial, llama + alpaca is definitely the track to process. [merlyn], I understand that -- it's just that I prefer to teach things such that I refine, rather then break, my students mental models later. Then again, I don't teach much, and never in large groups. [theorbtwo] - someday, you'll notice what I did as a blessing, not a curse. :) So... then I got the second edition camel... and that was my bible while learning about perl's OO brew and all sorts of nifty things about perl5... so thank you one last time [merlyn]. (And you're welcome again.) the way to teach "baby perl" is to teach a model that actually has a few holes. that's life. thanks saugo Oh, I'm not saying that your books are bad. They're rather good. I just think that they could be better. There are very few things I read and say "that couldn't have been better". I'd challenge you to teach the same level of material in the same number of pages. seriously. I've spent a lifetime learnign how to teach this stuff. Hehe. <code>curse( $foo ); # P5 compatible object model (in P6)</code> so I'll kindly suggest that you refrain from such crap unless you're willing to put yoru money where your mouth is. LOL, [Arguile]. Hm. Never considered technical writing and teaching as a carreer. And I wasn't calling your work crap by any means. And I dont' see O'Reilly clamoring to get you to write their next book. No, I'm calling your claim crap. I think you have no clue here. And I'll show you my reviews and royalty checks to prove it. I have credentials. Critical Acclaim. Street Cred. You are just a guy who seems to always be over your head here on perlmonks. You have no weight here. [merlyn], I have no doubt that your books are popular, that many people like them, and that you're a very good teacher. so move along, please. your comments are baseless. * sauoq thinks he could do a good job of writing a book. How do you go about doing it and making a living at the same time? * castaway giggles I will certainly listen to any valid criticism. Please forward that to merlyn@stonehenge.com - I'm curious. In fact, I consider the book of yours that I own in hardcopy to be probably the best-written non-fiction book I own. book writing is NEVER about making a living That's what I'm missing... how do I approach a publisher and get them to pay my rent and bills for the time it takes me to write a book. I'd happily quit my job and do that... it's only about credentials or collateral. Book writing is never a living [sauog] - if you figure that out, lemme know. :) [sauoq], first you give them a finished book. Then, if it's really really good, you might have a prayer, possibly, of that happening the next time. * castaway thinks several fiction authors would argue about that.. right.. SF can be a living. But not techwriting. too small an audience. [castaway], every time I've ever heard a writer write about writing, they've said that it's a horrible way to make a living. I'm an incredibly successful techwriter.... and yet the best month I've had in royalties paid about $10K. * sauoq sighs. that may seem huge, but there's been far too many $1K months as well. hmm.. havent looked hard enough then.. I see several that enjoy it.. (Terry Pratchett for example..) so, back to the issue. [theorbtwo] - if you have legitimate complaints, please email me. Lemme brew on it. But I bet you won't have anything that would have changed the way I did Llama or Alpaca. BTW, [merlyn], ever consider putting out a book of collected articles? (Or do you not have rights to do such a thing?) and in fact, I'd bet you are telling me to change things in a way that I know for sure didn't work in the past. [theorbtwo] - that's in progress. expect such in a year or so. Cool. I'll quite likely buy such a beast. [sauoq] try this: [http://www.megafortress.com/essay2.htm|breaking in is hard to do] that's what I and the publisher are hopping (hoping) * kodo likes effective perl programming a lot... we're taking my 166 columns, throwing out the redundant ones, organizing them into topics, then creating a few paragraphs to "update" anything that needs such. EPP for Stonehenge is being replaced by Alpaca fwiw, I think you did the right thing in drawing a distinction between references and scalars. I don't think I agree that doing so is more pedantic... but less so. But, I'll reiterate, I think less pedantic is probably good for a learning book. all I can say is whatever I'm doing in alpaca is nearly essential for learning, even if it breaks models needed later. that's the strategy I'm always willing to take in a tutorial book * theorbtwo shrugs. [merlyn] is right; he is vastly more qualified then I am to be making assertations like this. I say it on page one of my course materials "we lie from time to time" There's been two kinds of debates/arguments I've had with you, and this one is the "it's just style" kind. it's because I have to give scaffolding. sometimes, the scaffolding is not the final materials. that's life. yeah, an art call, based on experience. (I actualy had substance the other day, on for/foreach terminology, was actualy grounded in a good point, which I should write coherently at some point. (That being that terminology should be easy to use correctly.)) don't knock my art until you have faced thousands of students. until then, you haven't "earned your licks" enough for me to pay attention. :) /me.oO(if i were not so overtired, i might get up and dance having finshed the deadline coding for the site.) Right. And understandable. in an ideal world, perhaps the teaching would be different. I live in my world, not that ideal world. The scary part is, you meant thousands of students in a large ampitheter, didn't you? I mean everythign from 2 people to 200 people, yes. I don't teach large groups, ever. In fact, I don't teach professionaly in any matter. bing! so your comments about "how to teach" are all crap. OK. :) * sauoq considers it for a moment... online, I've had thousands of students... only dozens in real life... but I've taught a lot on IRC... nothing structured of course... hrm... maybe I should go into teaching. Got an opening on your team [merlyn]? allow me to introduce myself as "Randal the professional teacher, writer, and tutorial author" then. g'nite everyone (merlyn and orb, dont hurt each other... much) ;-P OTOH, I don't ever recall somebody complaignign about my teaching style... including teachers I constantly corrected to the point a good argument can be made that I was teaching. [alexander], goodnight. [saouq] - I hire only people who are famous. (1) get famous. (2) I'll notice you. * theorbtwo wonders momentarly if [merlyn] has ever hired somebody other then [merlyn]. night alexander [http://www.unixreview.com/documents/s=8217/ur0306h/] I respect Randal the professional teacher, writer, and tutorial author. If I didn't, I wouldn't bother trying to disagree with him. I've had a half dozen instructors working for me, yes. wow. I always got the impression you were a one-man show. Joseph Hall, Tom Phoenix, Chip Salzenberg, brian d foy, Tad Maclellan you certainly don't visit my website ever then. I also had a few others who tried but washed out during the prelims Tad McClellan is famous? I've been there a few times, actualy, but normaly just to read your articles, which are quite fun, even when I've been over the same ground myself. [merlyn]: Does brian d foy insist on monospace for his name? he was answering nearly every other question in comp.lang.perl.misc when I approached him But whatever... if I get famous [merlyn] it'll be too late. You will have missed your chance. Poof. Gone. [http://www.panix.com/~comdog/style.html] .oO(Getting famous in the Perl community is no problem - getting famous and still being liked in the Perl community is harder :-)) famous != marketable. I turn famous people into marketing items. if you don't know the difference, you'll never make money. :) * theorbtwo wonders if it'd be d foy, brian. Stonehenge is a marketing machine. we work hard to brand the brand, and have people call us first. That's not what I need... I need the avenue to get famous. Timing and all, ya know? I missed the perl boat by a couple years.... that and I took employment in the private sector where I needed to be careful about my open source involvement at times.-sigh- feel free to try to do the marketing on your own. you'll come up short. I've spent hundreds of thousands of dollars marketing the Stonehenge brand. ask Allison Randal about how long it takes to be famous. And you do a good job, [merlyn]. If I needed a perl class taught, I'd email you first... and then have no idea where else to look. I gave her the same challenge I just gave you. WIthin six months, she pushed herself into the Perl6 committee. And now has a book already available at OSCON. she had asked to work with me. I told her what I just told you. she is clearly famous now. I'd hire her in a second. so don't tell me that you can't be famous within a year or so. It's been done! (who's Allison Randal ?) it's about finding a need within the Perl community, and filling it excellently. then your name gets out there. and that makes you marketable for Stonehenge. Wait... "You'll come up short?" Heh. That's cute. Well... I sure am lucky that my future doesn't rely on your faith, aren't I? [castaway] - you've not been following perl6 at all, apparently. :) Nope, cant say I have * kodo also got no clue about perl6 yet... * theorbtwo wonders momentarly if [tye] or [vroom] is really famous in the community-at-large, or just here. [vroom] gets street cred for perlmonks, but [tye] hasn't outted himself enough to do so. perl6 is fun stuff... half of the time I read somthing of [thedamian]'s, I just go "huh?"... but the "whoh"s are intense. Thanks for the link [castaway]. but then, I'd been using perl for 2 years, and hadnt heard of you til I came here, either * theorbtwo nods. in terms of perl6 design, it's Larry, Damian, and Allison. They are The Holy Three. and that's due in part to my urging her to be a famous person. * djantzen has set his sights on infamy instead. * merlyn sets his sights on blasphemy welcome, [sauoq] (some of his others are also not bad.. and the books anyway ,) Odd, it's always looked from here like Allison is one of the more minor people -- a lot of Larry, Damian, and Dan (though he has a slightly different sphere). I suspect Allison just gets less credit and/or puts out less public emails. [castaway], but this site was your first exposure to The Community, wasn't it? Well... there it goes.... you had a chance there. Momentarily. Now, if I ever talk to you about working for you again... it'll be you asking me and me saying "no thanks." Then I'll wink and whisper, "by the way, I'm bones." never heard of bones. if you had street cred, I'd know you. * castaway nods [theorbtwo] [sauoq], can I suggest that picking one name might be a good thing in terms of famousness? OTOH, if I winked at [merlyn], and whispered "by the way, I'm theorbtwo", I'd probably get slugged... ;) rollin' bones, jay bones.... talk about street cred... you have no idea. :-) * djantzen can hear [sauoq]'s sigh all the way over here. listen, if you wanna be a fuckhead, and be pseudonymous when you don't need to be, go ahead. (Yes, I have read your name space, [sauoq], I do know that [sauoq] is a 180deg rotation of bones -- but people who know who sauoq is won't realize they know bones, and vice-versa.) [theorbtwo] Nah... ubergeeks always have at least 3 names... they're kinda like cats. Ever read T.S.? Works well enough for [chromatic]. you earn no respect with me hiding behind a pretend name. I am very clearly who I am, and it works for me. Now I'm a fuckhead? and [chromatic] is clearly chromatic everywhere. not his real name anywhere. [sauoq], can't say I have. (And James Mastros, theorb, and theorbtwo, pleased to meet you, [sauoq], bones, and whateveryourrealnamehappenstobe.) * kodo lols (3 names? 1 name + 1 nick is enough for me..) Uh... exactly the reason for my advice [merlyn]. You're clearly Randal Schwartz, wherever you go, even here, where it says [merlyn]. Similarly, chromatic is always chromatic, even more so. so [sauoq] - I have no respect for you, because you are pretending to be someone whom you arent'. even if you are someone famous, you're being a fuckhead. * sauoq was being obtuse, [castaway]... but it's a good rule of thumb just the same. Makes little difference if the name you use was given to you by your parents. Indeed, people will remember chromatic or brian d foy on the cover of a book. I don't appreciate people who lie to me. D'oh! Easy to miss a slash. Well, I often think the same of you. You're entitled, of course. Interesting, [merlyn] -- exactly my earlier point -- I don't like tutorials that lie to me. ... <code>code be gone</code> * sauoq never lied once. All tutorials lie. Get over it. To you that is... I'm not a saint. if they didn't lie, they'd be reference books. :) * kodo lols a bit more I am over it, [merlyn]. I do think its funny that you just have no idea whether I'm famous or not... I can see the gears churning... "well, he's not a newbie... do I know this guy? Have I met him?" well, if you're sherm pendley, you certainly pick a weird way to presence yourself in the world. and if that's also an alias, I'm even more disgusted with you. :) You just need to get over yourself. Street cred... pshaw. "famous" pbbbt. [merlyn], you're both famous and rather respected. If I had to choose one, I'd rather be respected. you've certainly earned a few points in the "ASSHOLE" category. What kind of name is "sherm pendley"? * theorbtwo sighs, and would also rather have a full nights sleep, but has to get up in a maximum of 4.5 hours... goodnight, all. that's "camelbones" - since you also call yourself "bones", I suspect a link. Cool. I thought we playing HORSE... but I guess I did sink a couple three pointers. but you know, I just plain don't care. I'm not into puzzles. If you'd rather be hidden behind a puzzle, you're a fucking nobody. go away. * castaway gives [theorbtwo] a birthday kiss and sends him to bed.. * merlyn heads off to bed Goodnight, [merlyn]. Never heard of "camelbones". I used to smoke camels... years ago. The filtered ones... the unfiltered made even me hack... night merlyn.. * djantzen wonders how one's street cred is affected by successfully goading someone of [merlyn]'s stature into flinging slurs... camels, or kamels, [sauoq]? everyone's a nobody finally. doesn't mean anything to be famous or not. * sauoq smiles. camels. * castaway grins to herself. * theorbtwo suspects [merlyn] would be a little more respected and a little less famous if he were to swear less when confronted with critisisim...and wonders which he'd prefer. And I kept it in bounds the whole time too, [djantzen]... wonderous, huh? i certainly hope watching this discussion was not someone's first exposure to perlmonks [robobunny], my first exposure to PM was the stink around [merlyn]'s name being taken off of Camel3. * Corion has this surefire plan to get famous and disrespected in the core Perl community, while at the same time earning some money ... But he is too chicken ... The way I hear it, he didn't even contribute that much to the 2nd ed. I really have lots of respect from merlyn when it comes to coding and his books. But tbh until I saw him talking here and on some nodes I thought he'd be a much more gentle person...with more wisdom not caring about beeing "famous" or not... in a way, talking smack about your perl street cred is pretty hilarious if you think about it anybody know how to grant a user an email address while not allowing ftp on linux? * djantzen practices his not famous signature. [sauoq] - the only people who say that are the people who weren't there. Anyway, goodnight, really. and now I suspect you may actually be Tom Christiansen. How interesting. that would nearly explain your previous behavior here. true, theres an /etc/ftpusers for those allowed to do ftp.. true: don't understand your question...why shouldn't that work? * sauoq would rather be a plain old guy... working a plain old job... raising his beautiful little daughter... than a famous geek with street cred and huge head. ftp servers typically don't allow access if your shell is not listed in /etc/shells [kodo] - I'm responsible for everythign I say, but I'd appreciate concrete feedback instead of abstract handwaving, thank you. I thought you'd still be listening. /etc/ftpusers is actually people who are not allow to use ftp Whoa. So it's really Gnat. How cool. merlyn: sure, that's fine. I respect your point of views just think you should be a bit more open and don't take things that serious. :-) Again, putting on a clown face and walking in to here doesn't impress me. oops.. well, right thought .. thanks robobunny There are very few things that I take seriously. Perhaps you don't agree, but allow me that indulgeence. * sauoq wonders how many other people he will guess that I am... spreading crap amongst the community like bad security advice or bad code, I take seriouslyl. [merlyn], I just /msg'd a reminder to myself to write a meditation on terminology, I welcome your thoughts on it when I finish it (which, at the rate I'm going on my mental todo will be a while.) so i add users to this file. and restart?? You were right the first time, dude... I'm "a nobody"... what are you worried about? What are all these shadows jumping up and attacking you? * merlyn would like to wring [sauoq]'s neck, and now realizes this is exactly the behavior that [sauoq] is trying to elicit. How droll. you shouldn't have to restart the ftp daemon OK, nothing more from me regarding the troll. /me moves on I'm not trying to elicit any behavior, [merlyn]. But, so nice of you to start spelling the name right. OK, really, really, really time for bed. And, calling me a troll here is sort of joke. I think there's enough evidence that I come to help out. now fucking leave orb or I'll tell castaway to bring you to bed :-) thanks monks, works great. my domain control panel thanks you. * castaway would love to .. Yes, [kodo|sir]! Not that she hasn't been trying, sir! * castaway .oO( gone .. ) [sauoq] is not and never has been a troll [merlyn].