Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

use File::HomeDir

This will fix an issue on Windows 7. Bump version to 0.0.3
  • Loading branch information...
commit 35cf097f2c5d4b01cdf562eee38b4dbf33edf12a 1 parent 4d38cc9
Tobias Leich authored January 08, 2013
1  Build.PL
@@ -9,6 +9,7 @@ my $build = Module::Build->new(
9 9
   license              => 'perl',
10 10
   requires             => {
11 11
     'File::ShareDir'   => '0',
  12
+    'File::HomeDir'    => '0',
12 13
     'File::Spec'       => '0',
13 14
     'Time::HiRes'      => '0',
14 15
     'SDL'              => '2.532',
3  CHANGELOG
... ...
@@ -1,5 +1,8 @@
1 1
 Revision history for Perl module Games::BubbleBreaker
2 2
 
  3
+0.03 Tue Jan 08 2013
  4
+     - use File::HomeDir (thanks to Mithaldu)
  5
+
3 6
 0.02 Fri Jun 24 2011
4 7
      - better tests
5 8
 
7  META.json
@@ -4,7 +4,7 @@
4 4
       "Tobias Leich <froggs@cpan.org>"
5 5
    ],
6 6
    "dynamic_config" : 1,
7  
-   "generated_by" : "Module::Build version 0.38, CPAN::Meta::Converter version 2.110930",
  7
+   "generated_by" : "Module::Build version 0.4001, CPAN::Meta::Converter version 2.110440",
8 8
    "license" : [
9 9
       "perl_5"
10 10
    ],
@@ -26,6 +26,7 @@
26 26
       },
27 27
       "runtime" : {
28 28
          "requires" : {
  29
+            "File::HomeDir" : 0,
29 30
             "File::ShareDir" : "1.00",
30 31
             "File::Spec" : 0,
31 32
             "SDL" : "2.532",
@@ -36,7 +37,7 @@
36 37
    "provides" : {
37 38
       "Games::BubbleBreaker" : {
38 39
          "file" : "lib/Games/BubbleBreaker.pm",
39  
-         "version" : "0.02"
  40
+         "version" : "0.03"
40 41
       }
41 42
    },
42 43
    "release_status" : "stable",
@@ -48,5 +49,5 @@
48 49
          "url" : "http://github.com/FROGGS/Games-BubbleBreaker"
49 50
       }
50 51
    },
51  
-   "version" : "0.02"
  52
+   "version" : "0.03"
52 53
 }
7  META.yml
@@ -7,7 +7,7 @@ build_requires:
7 7
 configure_requires:
8 8
   Module::Build: 0.38
9 9
 dynamic_config: 1
10  
-generated_by: 'Module::Build version 0.38, CPAN::Meta::Converter version 2.110930'
  10
+generated_by: 'Module::Build version 0.4001, CPAN::Meta::Converter version 2.110440'
11 11
 license: perl
12 12
 meta-spec:
13 13
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -16,8 +16,9 @@ name: Games-BubbleBreaker
16 16
 provides:
17 17
   Games::BubbleBreaker:
18 18
     file: lib/Games/BubbleBreaker.pm
19  
-    version: 0.02
  19
+    version: 0.03
20 20
 requires:
  21
+  File::HomeDir: 0
21 22
   File::ShareDir: 1.00
22 23
   File::Spec: 0
23 24
   SDL: 2.532
@@ -25,4 +26,4 @@ requires:
25 26
 resources:
26 27
   license: http://dev.perl.org/licenses/
27 28
   repository: http://github.com/FROGGS/Games-BubbleBreaker
28  
-version: 0.02
  29
+version: 0.03
5  bin/bubble-breaker.pl
@@ -5,6 +5,7 @@
5 5
 
6 6
 use Time::HiRes;
7 7
 use File::ShareDir qw(dist_dir);
  8
+use File::HomeDir;
8 9
 use File::Spec::Functions qw(splitpath catpath catdir catfile);
9 10
 
10 11
 use SDL;
@@ -43,9 +44,7 @@
43 44
                                            depth => 32, title => "BubbleBreaker", color => 0x000000FF,
44 45
                                            flags => SDL_SWSURFACE|SDL_DOUBLEBUF|SDL_NOFRAME,
45 46
                                            init => 0, eoq => 1, delay => 20 );
46  
-my $HOME                 = $^O eq 'MSWin32'
47  
-                         ? catpath($ENV{HOMEDRIVE}, catdir($ENV{HOMEPATH}, '.bubble-breaker'))
48  
-                         : "$ENV{HOME}/.bubble-breaker";
  47
+my $HOME                 = File::HomeDir->my_home . "/.bubble-breaker";
49 48
 mkdir($HOME) unless -d $HOME;
50 49
 my ($v, $p, $f)          = splitpath(__FILE__);
51 50
 my $SHARE                = -e catpath($v, catdir($p, '..', 'share'), 'background.png')
2  lib/Games/BubbleBreaker.pm
... ...
@@ -1,6 +1,6 @@
1 1
 package Games::BubbleBreaker;
2 2
 
3  
-our $VERSION = '0.02';
  3
+our $VERSION = '0.03';
4 4
 
5 5
 1;
6 6
 

0 notes on commit 35cf097

Please sign in to comment.
Something went wrong with that request. Please try again.