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

Re: lost in my first Perl module

by Anonymous Monk
on Jun 23, 2010 at 17:17 UTC ( #846118=note: print w/replies, xml ) Need Help??

in reply to lost in my first Perl module

Like ikegami said, you probably just want to use DBI.

If you needed to write an object-oriented module, I'd recommend Moose, but it doesn't sound like you need to.

To get started (if you actually don't need an OO module), just create yourself a file, put package SybaseManip; at the top of it, and start writing some subs to do your bidding. To use your code from a test script, just put this at the top of said script:

use lib 'path/to/where/'; use SybaseManip;

and start calling your functions.

Replies are listed 'Best First'.
Re^2: lost in my first Perl module
by Anonymous Monk on Jun 23, 2010 at 17:23 UTC

    Forgot to mention: when you call your functions in your test script (for the setup described above), you'll need to fully-qualify their names, as in: SybaseManip::my_func(...).

    And if you have any globals in your file (as in: our $foobar = 'baz';), you can access them from your script similarly: $SybaseManip::foobar

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://846118]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (2)
As of 2022-10-03 04:14 GMT
Find Nodes?
    Voting Booth?
    My preferred way to holiday/vacation is:

    Results (13 votes). Check out past polls.