Changeset 4274 for lang/perl/Config-Pit
- Timestamp:
- 01/09/08 17:35:22 (5 years ago)
- Files:
-
- 1 modified
-
lang/perl/Config-Pit/trunk/lib/Config/Pit.pm (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/perl/Config-Pit/trunk/lib/Config/Pit.pm
r4260 r4274 121 121 use Config::Pit; 122 122 123 my $config = pit_get(" twitter.com", require => {124 "username" => "your username on twitter",125 "password" => "your password on twitter"123 my $config = pit_get("example.com", require => { 124 "username" => "your username on example", 125 "password" => "your password on example" 126 126 }); 127 127 # if the fields are not set, open setting by $EDITOR … … 137 137 138 138 $ sudo gem install pit 139 $ pit set twitter.com140 # open setting of twitter.com with $EDITOR.139 $ pit set example.com 140 # open setting of example.com with $EDITOR. 141 141 142 142 =over … … 146 146 Get setting named C<setting_name> from current profile. 147 147 148 my $config = Config::Pit::get(" twitter.com");148 my $config = Config::Pit::get("example.com"); 149 149 150 150 This is same as below: 151 151 152 my $config = pit_get(" twitter.com");152 my $config = pit_get("example.com"); 153 153 154 154 opts: … … 158 158 =item require 159 159 160 my $config = pit_get(" twitter.com", require => {161 "username" => "your username on twitter",162 "password" => "your password on twitter"160 my $config = pit_get("example.com", require => { 161 "username" => "your username on example.com", 162 "password" => "your password on example.com" 163 163 }); 164 164 … … 172 172 Set setting named C<setting_name> to current profile. 173 173 174 Config::Pit::set(" twitter.com"); #=> will open setting with $EDITOR174 Config::Pit::set("example.com"); #=> will open setting with $EDITOR 175 175 176 176 opts: … … 180 180 =item data 181 181 182 Config::Pit::set(" twitter.com", data => {182 Config::Pit::set("example.com", data => { 183 183 username => "foobar", 184 184 password => "barbaz", … … 192 192 193 193 194 Config::Pit::set(" twitter.com", config => {194 Config::Pit::set("example.com", config => { 195 195 username => "config description or default value", 196 196 password => "same as above",
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)