Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re^2: Perl Inheritance & module variables

by diabelek (Beadle)
on Sep 19, 2008 at 16:26 UTC ( #712547=note: print w/replies, xml ) Need Help??

in reply to Re: Perl Inheritance & module variables
in thread Perl Inheritance & module variables

Well that does what I want but I really hate having to turn off the strict refs... I think I would prefer to just copy the data into the instance and deal it with that way unless there is a lot of data i need to copy or its time sensitive. Unless there is a better way of doing it, I think I might just keep that in my back pocket for when I really do need it.

Thanks a bunch

  • Comment on Re^2: Perl Inheritance & module variables

Replies are listed 'Best First'.
Re^3: Perl Inheritance & module variables
by gone2015 (Deacon) on Sep 20, 2008 at 08:53 UTC

    Wishing to maintain "strict refs purity" is entirely commendable :-)

    For completeness, however, I'll point out that the 'no strict'-ness is scoped within the current block. So the unpleasantness is contained. In the code I gave the the nastiness was enclosed in a subroutine. If it's necessary to do this in 'open code' you can always:

    { no strict 'refs' ; .... # unspeakable stuff redacted } ;
    to avoid contagion

    Anyway, I think that with a small penance, in the form, say, of an explanatory comment, one can forgive oneself this particular sin -- provided it doesn't become a habit :-)

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://712547]
[Corion]: It's close to my Perl script where you paste in the SQL and get the result as XLSX file, but I guess the Excel sheet is more user-friendly :)
[choroba]: What drivers does it support? ;-)
[erix]: sounds cool -- but now you have to give SQL lessons?

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2018-07-18 13:07 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (392 votes). Check out past polls.