Skip to content
This repository
Browse code

[GH #877] Removed Parrot::Revision

Now that the dependencies on Parrot::Revision have been removed, it's now
possible to remove Parrot::Revision itself.  The tests pass, so all is good.
  • Loading branch information...
commit 94df5d8d7c225f2134df54f76b365e9ba1b186cd 1 parent 7bb92e8
Paul Cochrane paultcochrane authored

Showing 2 changed files with 0 additions and 89 deletions. Show diff stats Hide diff stats

  1. +0 1  MANIFEST
  2. +0 88 lib/Parrot/Revision.pm
1  MANIFEST
@@ -1040,7 +1040,6 @@ lib/Parrot/Pmc2c/Parser.pm [devel]lib
1040 1040 lib/Parrot/Pmc2c/Pmc2cMain.pm [devel]lib
1041 1041 lib/Parrot/Pmc2c/UtilFunctions.pm [devel]lib
1042 1042 lib/Parrot/Pmc2c/VTable.pm [devel]lib
1043   -lib/Parrot/Revision.pm [devel]lib
1044 1043 lib/Parrot/SHA1.pm [devel]lib
1045 1044 lib/Parrot/SearchOps.pm [devel]lib
1046 1045 lib/Parrot/Test.pm [devel]lib
88 lib/Parrot/Revision.pm
... ... @@ -1,88 +0,0 @@
1   -# Copyright (C) 2005-2011, Parrot Foundation.
2   -
3   -=head1 NAME
4   -
5   -Parrot::Revision - Revision number of Parrot
6   -
7   -B<Note:> This package is largely obsolete, as the Git version control system
8   -does not use a continually incrementing integer to designate a particular
9   -revision, as our previous CVS and Subversion VCSes did. We retain it for
10   -backwards compatibility for certain high-level languages built on top of
11   -Parrot.
12   -
13   -=head1 SYNOPSIS
14   -
15   - use Parrot::Revision;
16   -
17   - print $Parrot::Revision::current;
18   -
19   -=head1 DESCRIPTION
20   -
21   -Get parrot's current and configure time revision.
22   -
23   -We currently always return "1" to tell old HLL's that this version of Parrot is too new for them.
24   -There is currently no way to say "we are too new for you", so we have to lie again and say we are
25   -too old.
26   -
27   -=cut
28   -
29   -package Parrot::Revision;
30   -
31   -use strict;
32   -use warnings;
33   -use lib qw( lib );
34   -use Parrot::Configure::Utils qw( :cache );
35   -
36   -our $cache = q{.parrot_current_rev};
37   -
38   -our $current = _get_revision();
39   -
40   -sub update {
41   - my $prev = _get_revision();
42   - my $revision = 1;
43   - $current = _handle_update( {
44   - prev => $prev,
45   - revision => $revision,
46   - cache => $cache,
47   - current => $current,
48   - } );
49   -}
50   -
51   -sub _handle_update {
52   - my $args = shift;
53   - if (! defined $args->{revision}) {
54   - $args->{revision} = 'unknown';
55   - print_to_cache($args->{cache}, $args->{revision});
56   - return $args->{revision};
57   - }
58   - else {
59   - if (defined ($args->{prev}) && ($args->{revision} ne $args->{prev})) {
60   - print_to_cache($args->{cache}, $args->{revision});
61   - return $args->{revision};
62   - }
63   - else {
64   - return $args->{current};
65   - }
66   - }
67   -}
68   -
69   -sub _get_revision {
70   - my $revision;
71   - if (-f $cache) {
72   - $revision = read_from_cache($cache);
73   - }
74   - else {
75   - $revision = 1;
76   - print_to_cache($cache, $revision);
77   - }
78   - return $revision;
79   -}
80   -
81   -1;
82   -
83   -# Local Variables:
84   -# mode: cperl
85   -# cperl-indent-level: 4
86   -# fill-column: 100
87   -# End:
88   -# vim: expandtab shiftwidth=4:

0 comments on commit 94df5d8

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