Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid

Re: how to create a database in perl

by erix (Vicar)
on Jan 28, 2011 at 14:30 UTC ( #884835=note: print w/replies, xml ) Need Help??

in reply to how to create a database in perl

You control that via the dsn; see the DBD::mysql docs (second line of the synopsis):

$dsn = "DBI:mysql:database=$database;host=$hostname;port=$port";

Specifically: the 'database=$database;' part.

The part of the dsn after 'dbi:<driver>:' is given as a whole to the specific database driver; what the driver expects is specific to that driver. For example, in the case of postgresql database driver DBD::Pg, the database can be given with either 'database', 'dbname', or 'db'.

Replies are listed 'Best First'.
Re^2: how to create a database in perl
by Your Mother (Chancellor) on Jan 28, 2011 at 14:41 UTC
    the database can be given with either 'database', 'dbname', or 'db'

    I think the question is "how can the database name not be given?"

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://884835]
Corion idly wonders about creating a series of HTTP requests. There seems to be no framework to generate a series of HTTP requests, like "try all these requests"
[Corion]: This is vaguely inspired by that list of "nasty" strings, which I'd like to replace among HTTP parameters, just to see whether the application crashes, but also for easy downloading of a list of URLs etc
[Corion]: Maybe I'll just conoct something using Algorithm::Permute to create an (OO) generator for such requests, or a simple function.
[Corion]: For testing I imagine one would want to test a random sampling of such "bad"/"unexpected" requests, while for downloading, one would want to generate them all in order, but not necessarily as a huge list

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (8)
As of 2017-01-16 15:38 GMT
Find Nodes?
    Voting Booth?
    Do you watch meteor showers?

    Results (151 votes). Check out past polls.